I’ve been following the CKA course on KodeKloud.
I require some clarification on a specific kubectl command -
kubectl get <pod-name> -o yaml
For scenarios where you’d need to make minor edits to a PodSpec using this would output the YAML required to spin up a similar pod after making your edits.
The output contains unwanted fields that are updated by Kubernetes to the running pod (ex. managedFields, status) which I delete and proceed with pod creation.
However, I’ve noticed that in the solution videos whenever “-o yaml” is used the output only contains the necessary fields.
I just want to confirm if the video is edited for brevity or if there is any work-around to get the YAML without the unwanted fields?
I’ve tried the Kubernetes docs but they only mention “-o yaml” outputs the spec in YAML format.
Thanks in advance.