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 ...
© Deepak Vohra 2016
Deepak Vohra, Kubernetes Microservices with Docker, 10.1007/978-1-4842-1907-2_3
3. Using Custom Commands and Environment Variables
Deepak Vohra1
(1)White Rock, British Columbia, Canada
Get Kubernetes Microservices with Docker now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.