Using Custom Commands and Environment Variables

Deepak Vohra · Apress eBooks · 2016

Kubernetes orchestrates Docker containers, and the instructions to run for a Docker image are specified in the Dockerfile . The ENTRYPOINT instruction specifies the command to run, and the CMD instruction specifies the default arguments for the ENTRYPOINT command. Kubernetes provides two fields, "Command" and "Args" , to be specified for a container image in a Pod definition to override the default settings of ENTRYPOINT and CMD . We shall discuss these fields in this chapter. We shall also discuss using environment variables in a Pod definition’s container mapping with the "env" field mapping. These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Read the paper · More papers on PaperTik