SkillByAIOpen interactive version →

Lesson 1 / 25

What Kubernetes Does

An operating system for a cluster.

Scheduling, healing, scaling, networking

Kubernetes is an open-source system for running containerised applications across a cluster of machines. You declare what should run (images, replica counts, resources, configuration), and Kubernetes schedules containers onto nodes, restarts failed ones, replaces pods on failed nodes, scales them, gives them stable networking and service discovery, and rolls out new versions gradually. It is powerful but complex; for a single small app, a simpler platform (a managed container service or PaaS) may be a better choice.

Desired state, continuously enforced

Kubernetes runs containers across machines and keeps reality matching what you declared.

Figure 1.1 — Purpose, architecture and objects.

A thermostat

You set the desired temperature; the thermostat keeps measuring and switching the heating on or off to hold it. Kubernetes controllers do the same for your workloads.

Use a managed cluster

Managed offerings (EKS, GKE, AKS and others) run the control plane for you; self-managing it is a significant operational job.

Quick check: What does Kubernetes do when a pod's node fails?

  • Deletes the Deployment
  • Nothing until an admin intervenes
  • Creates replacement pods elsewhere to restore the desired count
  • Shuts down the cluster
Answer

Creates replacement pods elsewhere to restore the desired count — Controllers reconcile toward desired state.