Video

What Is Kubernetes? Desired State and Self-Healing Explained | Learn in 30 Seconds

What Is Kubernetes? Desired State and Self-Healing Explained | Learn in 30 Seconds

Traffic spikes. Containers fall over. Who's restarting them at three in the morning?

Doing it by hand doesn't scale. Restart this one, add one there, move that workload off a dying node — repeat forever, and get it right while half asleep.

Kubernetes is a container orchestration platform, and the idea underneath it is simpler than the ecosystem around it suggests: you declare a desired state, and a control loop works continuously to make reality match it.

spec:
replicas: 3

You said three. Kubernetes keeps three running.

SELF-HEALING
One pod dies. Desired is still 3, actual drops to 2 — and that gap is the whole mechanism. The scheduler places a replacement on an available node, actual returns to 3, and nobody got paged.

ROLLING UPDATES
A new version doesn't replace everything at once. Pods are swapped a few at a time while the rest keep serving traffic, so the deploy doesn't become an outage.

TWO THINGS IT DOESN'T DO

✘ It doesn't fix your bugs. A crashing pod gets restarted, not debugged. If your app dies on startup, Kubernetes will restart it forever — `CrashLoopBackOff` is the sound of an orchestrator doing exactly what you asked while your service is completely down. A restart loop is not uptime.

✘ It doesn't autoscale by default. Scaling to load needs metrics collection plus a Horizontal Pod Autoscaler (or similar) that you configure with real thresholds. Out of the box, `replicas: 3` means three — at 3am and at peak.

Kubernetes doesn't make your application reliable. It makes your *intent* enforceable. What you declare is what it defends, which means a bad declaration gets defended just as faithfully as a good one.

—
#Astmation — #software #systems, #automation, and #AI-powered #applications.
Build. Automate. Evolve.
https://astmation.com/


Watch on YouTube

Back to videos