Is there any command or something like that to get to know about the optional and required parameters instead of referring to the documentation ?
HI @dnpuneeth3
Not really. There’s 2 ways
- The documentation
kubectl explain
kubectl explain pod.spec.containers
Fields that can come beneath the requested field (pod.spec.containers
) are listed, and any that are required are listed as such, e.g.
name <string> -required-
Name of the container specified as a DNS_LABEL. Each container in a pod
must have a unique name (DNS_LABEL). Cannot be updated.
1 Like
I actually raised a ticket a while ago to ask them to include in the explain output whether a field is mutable, i.e. can be edited on a running container, and to put -mutable-
on the description.
For instance, for a pod, there are very few mutable properties. image
is one that can be changed.