Search code examples
kubernetesyamlkubectl

kubectl YAML documentation for a resource


Is there a kubectl command that gives advice about essential fields required in the YAML, or YAML examples, for a given resource?

Currently, when I want a YAML example of a resource, for example a deployment, I search the online documentation. I'd rather stay in the terminal.


Solution

  • kubectl explain deployment works for resources which publish openapi specs.