Search code examples
dockerkubernetesmanifestkubectl

Guide to Kubernetes Manifests: Good Resources/Docker Run options


I was wondering if there was a centralized document on options that are available for use in Kubernetes manifest files;

I know there's a bunch on general YAML files but since theres an overlap of docker run commands and kubectl commands, I wanted to know which ones are actually useable for Kubernetes.

i.e. specifically docker run options include --net=host, --pid=host, --privileged

I know --privileged is for securityContext in the kubernetes manifest https://kubernetes.io/docs/user-guide/security-context/

containers:
...
  -name:
   ...
   securityContext:
     privileged: true

but as for the other two I can't find good resources to verify if those options are available.


Solution

  • All options and fields are documented within the resource references which you can find in the Kubernetes reference section.

    E.g. for the definition of a Pod you can check the related docs, you'll find that everything within the "spec" block relates to PodSpec objects and these contain among others Container definitions. Within the Container reference you'll find all required and optional fields.

    I assume that's the centralized document you were looking for.

    Besides that you might want to check the Container Command and Arguments reference guide.