Kubernetes (K8s)

An open-source system for automating deployment, scaling, and management of containerized applications.

## The Control Loop: Desired vs. Actual State
The heart of Kubernetes is the Controller Loop. It is a continuous process that:
1. Reads the Desired State (what you asked for in your YAML file).
2. Observes the Actual State (what is currently running in the cluster).
3. Takes action to fix any differences (e.g., pulling a new image or restarting a crashed Pod).
This 'Self-Healing' nature is what makes Kubernetes so powerful for running mission-critical software.

        graph LR
  Center["Kubernetes (K8s)"]:::main
  Pre_docker["docker"]:::pre --> Center
  click Pre_docker "/terms/docker"
  Rel_container_orchestration["container-orchestration"]:::related -.-> Center
  click Rel_container_orchestration "/terms/container-orchestration"
  Rel_microservices["microservices"]:::related -.-> Center
  click Rel_microservices "/terms/microservices"
  Rel_devops["devops"]:::related -.-> Center
  click Rel_devops "/terms/devops"
  classDef main fill:#7c3aed,stroke:#8b5cf6,stroke-width:2px,color:white,font-weight:bold,rx:5,ry:5;
  classDef pre fill:#0f172a,stroke:#3b82f6,color:#94a3b8,rx:5,ry:5;
  classDef child fill:#0f172a,stroke:#10b981,color:#94a3b8,rx:5,ry:5;
  classDef related fill:#0f172a,stroke:#8b5cf6,stroke-dasharray: 5 5,color:#94a3b8,rx:5,ry:5;
  linkStyle default stroke:#4b5563,stroke-width:2px;

      

🧒 Explain Like I'm 5

🌍 Imagine a giant ship carrying thousands of shipping containers. Instead of one captain trying to keep track of every single box, Kubernetes is like a robot crew that automatically puts the boxes where they belong, fixes them if they break, and adds more ships if there are too many boxes.

🤓 Expert Deep Dive

## The Control Loop: Desired vs. Actual State
The heart of Kubernetes is the Controller Loop. It is a continuous process that:
1. Reads the Desired State (what you asked for in your YAML file).
2. Observes the Actual State (what is currently running in the cluster).
3. Takes action to fix any differences (e.g., pulling a new image or restarting a crashed Pod).
This 'Self-Healing' nature is what makes Kubernetes so powerful for running mission-critical software.

🔗 Related Terms

Prerequisites:

📚 Sources