ConfigMaps & Secrets

Difficulty: Intermediate

Question

What is the difference between a ConfigMap and a Secret?

Answer

- **ConfigMap**: Stores non-confidential configuration data in key-value pairs (e.g., app settings, database hostnames). - **Secret**: Stores sensitive data (e.g., passwords, API tokens, SSH keys). Secrets are base64 encoded by default in the API, and can be encrypted at rest in etcd.

Concepts covered

ConfigMap, Secret, Environmental Variables, Volume Mounts