Getting help with YAMLs

Kubernetes built in kubectl explain command can be used as a helper tool when in confusion with YAMLs relating to kubernetes object.

kubectl explain pod

A level deep navigation into the pod would be something like

kubectl explain pod.spec

One move level deep navigation would be like

kuebctl explain pod.spec.affinity

The output of which looks like Image pod.spec.affinity

Another super useful command to list all available values one level below of affinity can be accomplished using

kubectl explain pod.spec.affinity --recursive

The output of which looks like the following Output pod.spec.affinity-recursive