AI Hints
Home›Kubernetes Tutorial›Delivery and Production
Kubernetes · Lesson 66 of 86

Production Readiness

The checklist before launch.

⏱ 2 min read▶ Video at 2:39:16🎓 Free
Watch this lesson in the Kubernetes courseWatch on YouTube ↗Full Kubernetes course

You now know the pieces. Before real users arrive, there is one more step, a careful check, that your application is ready to be run for real. In this lesson, we gather everything into a checklist, in four areas. Reliability, security, observability, and cost.

Production Readiness
From the video: Production Readiness
  • Four areas to check
  • Reliability and security
  • Observability and cost

Reliability checklist

First, reliability. Run at least two or three replicas of every important service. Spread them across nodes, and zones. Set resource requests and limits. Add readiness and liveness probes. Use a pod disruption budget, so that maintenance never removes too many pods at once. And define a rolling update strategy, that keeps enough pods available. These few settings turn a demo into a service.

2+ replicas, spreadacross nodes and zones
Requests and limitsevery container
Probesreadiness and liveness
Disruption budgetkeep enough pods up

Security checklist

Second, security. Run containers as non root, with a read only file system. Give each application its own service account, with least privilege. Apply network policies, so that only needed traffic flows. Keep secrets in a proper secret store, and encrypt et see dee. Scan and sign images, and pull them only from trusted registries. Enforce all of this with admission policies, so it cannot be forgotten.

Hardened podsnon-root, read-only
Least privilegeone service account per app
Network policiesdeny by default
Trusted imagesscanned, signed, enforced

Observability and cost checklist

Third, observability. Collect metrics, logs, and events, with alerts for the golden signals, and a runbook for each alert. Fourth, cost. Right size your requests, using real usage. Use autoscaling, so you pay for what you need. Put quotas on namespaces. Label everything by team, so you can see who spends what. And review the bill regularly, because clusters tend to grow quietly.

Metrics, logs, alertswith a runbook each
Right-size requestsmeasure real usage
Autoscalepay for what you need
Label by teamknow who spends what

A disruption budget

One setting deserves its own example, the pod disruption budget. It says, for pods with the label app equals web, at least two must stay available. When you drain a node for maintenance, Kubernetes will refuse to evict a pod, if that would break the promise. It waits, and evicts the pods one at a time, as replacements become ready. A tiny file, which protects every upgrade.

pdb.yamlyaml
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: web-pdb
spec:
  minAvailable: 2
  selector:
    matchLabels:
      app: web

Summary

Excellent. A production checklist covers reliability, security, observability, and cost. Disruption budgets, probes, and limits turn a demo into a service. You have now covered the whole path. Next, we put everything together, in a hands on workshop, building a complete application.

Key takeaways
  • Reliability: replicas, probes, budgets
  • Security: least privilege, policies
  • Observability and cost: measure both
Next up: Workshop — building a complete application