CKA course: -o yaml outputs unwanted fields but in solution video the output doesn't contain these fields

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.

Hello, @vijaypsamy
Yes, you are correct. Because unwanted fields keeping in the video’s example is not make sense.

Thanks for the quick response! I thought so too.

We won’t work on that managed fields. So removed from the video and only necessary fields mentioned in the video. For better understanding.