Abstract
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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2016 Deepak Vohra
About this chapter
Cite this chapter
Vohra, D. (2016). Using Custom Commands and Environment Variables. In: Kubernetes Microservices with Docker. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-1907-2_3
Download citation
DOI: https://doi.org/10.1007/978-1-4842-1907-2_3
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-1906-5
Online ISBN: 978-1-4842-1907-2
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)