Kubernetes Tutorial #4: ConfigMaps and Secrets — Manage Configuration
Your application needs a database host, a port number, an API key, and a password. How do you pass these to your containers in Kubernetes? You should not hardcode them in the Docker image. You should not put passwords in your Deployment YAML either. Kubernetes has two objects for this: ConfigMap — for non-sensitive configuration Secret — for sensitive data like passwords and API keys Why Not Hardcode Config? Imagine you hardcode a database hostname in your Docker image: ...