Hello, I used `kubectl get pod app --namespace elastic-stack -o yaml > app.ya . . .

Sidd:
Hello, I used kubectl get pod app --namespace elastic-stack -o yaml > app.yaml to create a yaml file but when I open it there are way too many fields. I even compared with solution video it has very less but mine is filled with loads of fields Why is that?

rakesh gorai:
Hello @Sidd Please refer this https://kodekloud.slack.com/archives/CDR4R9Z7E/p1618679258362000

Sidd:
Thanks @rakesh gorai no option to remove it? Also can I just modify and create this file?

Tej_Singh_Rana:
Hello, @Sidd
You can use grep -v command.

kubectl get po nginx -oyaml | grep -v 'f:' > pod.yaml

rakesh gorai:
Thanks @Tej_Singh_Rana

shridhar:
hi you can add below to the comamnd then take out out in yaml file

–dry-run=client