ConfigMaps vs Secrets
Comparison
| Feature | ConfigMap | Secret |
|---|---|---|
| Purpose | Non-sensitive config | Sensitive data |
| Encoding | Plain text | Base64 |
| Encryption at rest | No | Optional |
| Size limit | 1MB | 1MB |
| RBAC | Standard | Can be restricted |
When to Use ConfigMap
- Configuration files (nginx.conf, application.properties)
- Environment-specific settings (URLs, feature flags)
- Non-sensitive parameters
When to Use Secret
- Passwords and API keys
- TLS certificates
- Docker registry credentials
- OAuth tokens