Kubernetes is a system that runs containers across a group of machines and keeps them running the way you asked. You describe the result you want, and it works continuously to make the cluster match.
The problem it solves
Running one container on one machine is simple: Docker does it with a single command. Running dozens across several servers is not. Something has to decide which machine each container goes on, restart the ones that crash, move work off a server that dies and add copies when traffic grows.
Doing that by hand doesn't scale. Kubernetes (often written K8s) is a container orchestrator: it does that work for you.
The main pieces
- Cluster: the whole set of machines Kubernetes manages.
- Node: one machine in the cluster, physical or virtual, that runs your containers.
- Control plane: the components that make decisions for the cluster, such as where to place work and what to do when something fails.
- Pod: the smallest unit Kubernetes runs. A pod wraps one or more containers that share a network address and storage.
- Deployment: says which image to run and how many copies of its pod you want.
- Service: a stable name and address in front of a set of pods, so the rest of the app can reach them while individual pods come and go.
Desired state
The description of what you want is usually a YAML file, and Kubernetes keeps comparing it with what is running. Here is a Deployment asking for three copies of a web server:
Wondering how this was made? How we make these