@Vijin Palazhi @Mumshad Mannambeth
- When we have an existing pod and we want to modify it, we do kubectl get <podname> -o yaml > some.yaml
This some.yaml has too much extra data also suppose we tend to just change the serviceaccountName but we also have the volumeMount we get by default due to default serviceaccounttoken and forgot to remove it… whats the best way to modify the existing pod and how to extract just the relevant data ?
David had suggested to use
kubectl get po nginx -o yaml --dry-run > test.yaml but it errors out in 1.20… and Mayman had suggested kubectl get pod nginx -o yaml | grep -v “f:” > pod.yaml but this doesnt extracts the data