Skip to content
BIASED

Kubernetes in practice

Block 1 of 4~2 min

ConfigMaps and Secrets

Promote one image digest across environments; inject configuration separately. ConfigMap holds non-secret settings (feature endpoints, log level, upstream URLs) as env vars or mounted files. Secret holds credentials and TLS material the same way — but Kubernetes Secrets are base64-encoded in etcd, not encrypted by that encoding. Enable encryption at rest, tighten RBAC so only the workload's service account can read the Secret, and prefer external secret stores or sealed-secrets workflows over cleartext YAML in Git.

A common anti-pattern: baking ENV PAYMENT_URL=… into three different images for dev/staging/prod. That forces three digests and breaks "test what you ship." One digest + three ConfigMaps keeps CI honest. Mount config as files when you need atomic updates and sighup reloads; env vars are simple but require Pod restarts to change.

Rotate secrets by introducing a new version, rolling Pods, then retiring the old — the same expand/contract mindset as schema migrations. Sudden deletion of a live Secret mounts empty files and cascades into 500s.

Answers are saved on the server and tied to this browser until you sign in.