Containers & orchestrationAdvanced12h

Kubernetes basics.

Pods, deployments, services, and the control loop.

What is Kubernetes?

Kubernetes runs containers across a fleet of machines, keeping them healthy and reachable. You declare the desired state — "run three copies of this image" — and its control loop continuously works to make reality match, restarting and rescheduling as needed.

Why it matters

Kubernetes is the dominant container orchestrator, and most cloud-native teams run on it. Even when a managed platform hides some of it, understanding pods, deployments, and services lets you deploy, debug, and scale real workloads. It is one of the most in-demand DevOps skills.

What to learn

  • The declarative model and the reconciliation loop
  • Pods, the smallest deployable unit
  • Deployments and ReplicaSets for scaling and rollouts
  • Services for stable networking to pods
  • ConfigMaps and Secrets for configuration
  • Namespaces for isolation
  • kubectl for inspecting and debugging

Common pitfall

Thinking imperatively — running kubectl commands to fix things by hand instead of changing the declared manifests. Kubernetes will undo your manual change to restore the declared state, leaving you confused. Treat the YAML as the source of truth and apply changes through it.

Resources

Primary (free):

Practice

On a local cluster (kind or minikube), write a Deployment manifest for your image with three replicas and a Service to expose it. Apply it, then delete a pod and watch Kubernetes recreate it. Change the replica count in the manifest and re-apply. Done when you understand why the deleted pod came back.

Outcomes

  • Explain the declarative model and reconciliation loop.
  • Deploy an app with a Deployment and expose it with a Service.
  • Supply configuration with ConfigMaps and Secrets.
  • Debug a workload with kubectl.
Back to DevOps roadmap