Notes / tag / config

#config

10 notes

1 — ConfigMaps

ConfigMaps mounted as volumes update live on the filesystem when the source changes, but env vars sourced from a ConfigMap are frozen at container start until the pod restarts.

kubernetes config book

10 — ResourceQuota & LimitRange

ResourceQuota caps aggregate consumption per namespace while LimitRange sets per-object defaults and min/max — without a LimitRange, one pod that omits resource requests can exhaust the whole namespace's quota.

kubernetes config book

2 — Secrets

Kubernetes Secrets are base64-encoded, not encrypted, by default — real confidentiality at rest requires enabling etcd encryption or an external secrets store, not just using the Secret object.

kubernetes config book

3 — Downward API

The Downward API lets a container read its own pod's metadata — labels, annotations, resource limits, IP — as env vars or files, avoiding an API server round trip and the RBAC permissions that would require.

kubernetes config book

4 — Environment Variables

Env vars are resolved once when the container process starts, so a downstream ConfigMap or Secret edit has no effect until the pod is recreated — unlike a mounted volume, which the kubelet syncs live.

kubernetes config book

5 — Probes (Liveness, Readiness, Startup)

Startup probes exist to hold off liveness checks during a slow boot, since without one a container that's merely still initializing gets killed and crash-looped as if it were actually hung.

kubernetes config book

6 — Init Containers

Init containers run sequentially to completion before any app container starts, making them the natural place for one-time setup like schema migrations or dependency wait-checks that shouldn't re-run on every app-container restart.

kubernetes config book

7 — Sidecars

A sidecar shares the pod's network namespace and volumes with the main container, which is exactly what lets patterns like a local Envoy proxy or log shipper attach without any code change to the primary app.

kubernetes config book

8 — Multi-Container Pods

Containers in the same pod are always co-scheduled on one node and share the same lifecycle, which is why you can't scale or restart one container independently of the others in the pod.

kubernetes config book

9 — Application Health Patterns

Conflating liveness (should this be restarted) with readiness (should this receive traffic) causes cascading restarts when a pod is merely overloaded and slow rather than actually broken.

kubernetes config book