What Is Kubernetes
What Kubernetes Does and Why Orchestration Matters
What is Kubernetes? Kubernetes is an open-source container orchestration system that runs and manages containers across a group of machines, keeping them in the state you describe. Running one container on one machine is simple. Running hundreds of containers across dozens of machines is not.
Someone has to decide which machine runs each container, restart containers that crash, add copies when traffic grows and roll out new versions without downtime. This work is called orchestration. Kubernetes, often shortened to K8s, automates these tasks.
You describe the desired state, for example that three copies of a web application should always run. Kubernetes compares that description with what is actually running and makes changes to close the gap. If a machine fails, the containers on it are started elsewhere.
Kubernetes was first developed at Google and is now maintained under the Cloud Native Computing Foundation, a vendor-neutral open-source foundation. It runs on physical servers, virtual machines and cloud instances.
How the Control Plane and Worker Nodes Work Together
A Kubernetes cluster has two roles. The control plane stores the cluster state and makes decisions. Its main parts are the API server, which receives every request; etcd, a key-value store that holds cluster data; a scheduler, which picks a machine for new workloads; and controllers, which constantly compare desired and actual state.
Worker nodes run the actual workloads. Each node runs an agent called the kubelet, which receives instructions from the control plane and starts containers through a container runtime such as containerd. A networking component routes traffic to the right containers.
Because everything is driven by declared state, Kubernetes handles many failures without help. Controllers keep working to bring the cluster back to the state you described. People usually interact with the system through its API, most often with the kubectl command-line tool or with configuration files. The building blocks that these workloads use are described in Kubernetes pods, nodes and clusters.
Scaling a Store for a Seasonal Sale
An online store normally runs four copies of its checkout service. Before a seasonal sale, the team raises the number to twelve in its configuration. Kubernetes starts the extra containers on machines with spare capacity and spreads traffic across all copies. When the sale ends, the number is lowered and the extra containers stop, without anyone logging in to individual servers.
Frequently asked questions
Do I Need Kubernetes to Run Containers?
No. A single application on one server can run in containers without it. Kubernetes becomes useful when you run many containers across several machines, need automatic recovery or scale often. For small setups, simpler tools are usually enough.
Is Kubernetes the Same as Docker?
No. Docker builds and runs containers on one host, while Kubernetes schedules and manages containers across many hosts. Kubernetes can run containers built with Docker, because both use the same image standard. The Kubernetes vs Docker article explains how the two relate.
What Is a Managed Kubernetes Service?
A managed Kubernetes service is a cluster run by a cloud provider, which operates the control plane on your behalf. You still deploy and maintain your own applications, and you pay for the nodes and services you use. Several major cloud platforms offer managed Kubernetes.