Puneet Khanna:
how to exclude runtime data from kubectl get objecttype objectname -o yaml output?
Tony D.:
I use the krew extension called Neat, it’s almost perfect for that task
Tharanath:
> controlplane $ kubectl get po -n production -o yaml | egrep -v ‘f:|k:|.:’
I believe, k8s 1.21.xx on words you have this option: please try it
> --to hide managed fields
kubectl get po nginx --show-managed-fields=false -oyaml
> --to show managed fields
kubectl get po nginx --show-managed-fields=true -oyaml
Puneet Khanna:
Thanks