Skip to content

How to use it well

Declare everything in YAML, never kubectl-edit in production, put limits on every container, and use namespaces for isolation.

Kubernetes that ages well

  1. Everything in Git

    No kubectl edit, no kubectl run. All manifests in Git, applied via GitOps (Argo CD, Flux).

  2. Resource requests and limits on every container

    Without them, the scheduler cannot place pods sensibly and one greedy pod can starve a node.

  3. Health checks on every workload

    readinessProbe controls traffic; livenessProbe controls restarts. Without them, broken pods stay in rotation.

  4. Namespaces per environment

    dev, staging, prod in separate namespaces with RBAC and quotas. Not one flat cluster for everything.

  5. Pin image digests, not tags

    image@sha256:... in production. Tags move; digests do not.

  6. Prefer StatefulSets only when you must

    Stateless workloads belong in Deployments. StatefulSets are for databases and anything with stable identity.