How come in Solution video when I see they have ran the ``` kubectl get pod pod . . .

garshasp007:
How come in Solution video when I see they have ran the

kubectl get pod pod-name -o yaml > pod.yml 

is very clean. On the other hand my created yaml have lot of garbage ???

Mohamed Ayman:
You can exclude some of these fields using grep command to decrease the file:

$ kubectl get pod <pod-name> -o yaml | grep -v “f:” > pod.yaml

Otherwise you can use —dry-run=client option when running the pod

garshasp007:
will give it a try

Sarabesh:
thanks,.never new i can use dry-run=client in get command as well,

Sangeetha Radhakrishnan:
The dry-run=client will not work for get command. It was mentioned to use it for run command.

That’s because of the difference in versions of k8s and kubectl when shooting the video and the versions you are using. the kubectl v1.21 will not show managed fields by default