How Is a Kubernetes Cluster Put Together?
A Kubernetes cluster has a control plane that decides what runs and worker nodes that run it. Here is how the parts fit together, from etcd to the kubelet.
On this page
Short answer
Kubernetes architecture is the design of a cluster: a control plane made of the API server, etcd, the scheduler and the controller manager decides what should run and where, while worker nodes run the containers through the kubelet and kube-proxy. Networking and storage are handled by plug-ins, so the same cluster design works on different clouds and in a data centre.
What is Kubernetes architecture?
Kubernetes architecture is the design of a cluster: the parts that decide what runs, the parts that run it, and the way they communicate. A cluster has two kinds of parts. The control plane decides what should run and where. The worker nodes are the machines that actually run the containers.
Everything in the cluster is described as a desired state: files that say which container image to run, how many copies to run, and how traffic should reach them. The control plane reads that description and works to make the cluster match it, then keeps it matching when things change.
This design is what makes Kubernetes portable. The same application description can run on different clouds and on machines in a data centre, because the interface is the same. Understanding the parts matters because most cluster failures are failures of one part, and knowing which part failed is the fastest route to a fix.
What does the control plane do?
The control plane is the brain of the cluster. It stores the desired state, decides where work runs, and reacts when something changes. It is usually run as several copies so the cluster survives one of them failing.
The table below shows the four main control plane parts and what each one does.
| Part | What it does | What happens if it stops |
|---|---|---|
| API server | The front door: every request goes through it | No changes can be made |
| etcd | Stores the cluster state | The cluster cannot be read or changed |
| Scheduler | Chooses which node runs each new pod | New pods wait for placement |
| Controller manager | Keeps the real state matching the desired state | Failed pods are not replaced |
The API server is the only part other parts talk to directly. The scheduler and controllers watch etcd through the API server, and the worker nodes report back through it too. That single point of contact keeps the design simple, and it is why the API server is usually placed behind a load balancer in a production cluster.
What runs on a worker node?
A worker node is a machine that runs containers. Each node runs three pieces: an agent called the kubelet, a network proxy called kube-proxy, and a container runtime that actually starts the containers.
The kubelet is the node's link to the control plane. It receives pod descriptions from the API server, starts the containers, checks their health, and reports back. When a container stops, the kubelet reports it and the control plane starts a replacement, usually on a healthy machine.
Kube-proxy handles networking on the node. It sets up the rules that send traffic to the right pods when a Service is used, so other parts of the system can reach a set of pods at one stable address even as individual pods come and go. The container runtime does the low-level work of pulling images and starting containers. Together, these three pieces are all a node needs to join a cluster and run work.
A first cluster built from these parts is covered in the guide on how to implement Kubernetes.
How does networking work in a cluster?
Networking in a cluster has three layers, and each one is handled by a different part. Pods get their own addresses and can talk to each other directly. Services give a stable address to a set of pods. Ingress routes traffic from outside the cluster to the right Service.
Pod networking is provided by a plug-in called a CNI, which assigns addresses and connects pods across nodes. Different plug-ins make different trade-offs: some are simple overlays, others add network policy enforcement so a pod can only talk to the pods it is allowed to reach.
A Service is a stable front door for a group of pods, usually selected by labels. When pods are replaced during an update, the Service address stays the same, so callers never need to track individual pods.
An Ingress sits in front of Services and routes outside traffic by host name or path. DNS inside the cluster lets services find each other by name, which is why most applications refer to other services by a short name rather than an address.
Where orchestration is used in real systems is covered in the guide to Kubernetes and container orchestration.
How does storage work in a cluster?
Storage in a cluster is separate from the pods that use it, because pods come and go while data must survive. A pod that is replaced loses its local filesystem, so anything worth keeping must live in a volume that outlasts the pod.
Volumes come in two kinds. Ephemeral volumes live as long as the pod and are used for scratch space and caches. Persistent volumes live independently and are claimed by pods through a PersistentVolumeClaim, which asks for a size and an access mode without naming a specific disk.
The storage itself is provided by a plug-in called a CSI driver, which talks to the cloud provider or the storage system. That separation is useful: the same application can use cloud block storage in one environment and local disks in another, with only the storage class changing.
StatefulSets are the workload type for applications that need stable names and stable storage, such as databases, because each replica keeps its identity and its volume across restarts.
How do you design a cluster for high availability?
You design a cluster for high availability by removing single points of failure, starting with the control plane and then the nodes. A cluster that runs on one control plane node and one worker node is a demo, not a production system.
- Run three control plane nodes. Three copies of etcd can lose one member and keep working, and the API server runs behind a load balancer.
- Spread nodes across zones. Place worker nodes in at least two availability zones, so one zone failing does not take the whole cluster down.
- Run at least two replicas per service. Two copies prove the platform can survive one pod failing, and a pod disruption budget stops updates from taking all copies down at once.
- Set resource requests and limits. Requests let the scheduler place pods sensibly; limits stop one workload from starving the rest of the node.
- Keep etcd backed up and watched. Test restoring etcd from backup, because a cluster whose state store cannot be restored is a cluster that cannot be rebuilt.
- Put databases outside the cluster first. Use a managed database until the team is confident with the rest.
High availability is also an operating habit. Upgrades should roll one node at a time, and the team should practise the failure modes — a lost node, a lost zone, a failed etcd member — before they happen for real.
Example (hypothetical): a shop moves to three zones
Example (hypothetical): an online shop runs on a single-zone cluster with one control plane node and three worker nodes. A zone outage takes the shop down for four hours, so the team redesigns the cluster for high availability.
The new design has three control plane nodes, one per zone, behind a load balancer, and six worker nodes spread evenly across the three zones. Each service runs three replicas, and the scheduler is told to spread them so no two copies of the same service land in the same zone.
The shop's checkout service handles 600 orders an hour at peak. With three replicas across three zones, losing one zone leaves two replicas running, which still handles 400 orders an hour — enough to keep selling while the team restores the zone.
The monthly cost rises by about a third, from $900 to $1,200, because of the extra control plane and worker nodes. The team accepts that cost: one four-hour outage at peak had cost roughly $8,000 in lost orders.
What are the common mistakes?
The most common Kubernetes architecture mistakes are running a single control plane node, treating pods as permanent, and adding complexity before the basics work.
- One control plane node in production. If it fails, nothing can be changed and failed pods are not replaced. Three nodes is the minimum for a real cluster.
- Treating pods as servers. Pods are replaced, not repaired. Anything that must survive a pod restart belongs in a persistent volume or an external service.
- No resource requests. Without requests, the scheduler guesses, and one busy workload can starve its neighbours on the same node.
- Everything in one namespace. Namespaces separate teams and environments. Sharing one namespace makes accidents easy and debugging hard.
- Storing secrets in plain files. Secrets belong in the cluster's secret store or an external vault, never in container images or in version control.
- Adding a service mesh on day one. A mesh adds real value at scale, but it also adds a control plane of its own. Learn the cluster first.
Key takeaways
- A cluster has a control plane that decides and worker nodes that run the work
- The API server is the only front door; etcd holds the state everything else reads
- Each node runs a kubelet, kube-proxy and a container runtime
- Networking and storage are plug-ins, which is what makes clusters portable
- High availability means three control plane nodes, spread zones, and practised failure modes
Frequently asked questions
What is the Kubernetes control plane?
The control plane is the set of parts that decide what runs and where: the API server, etcd, the scheduler and the controller manager. It stores the desired state, places new pods on nodes, and replaces failed pods. Production clusters run three copies of it for high availability.
What is etcd and why does it matter?
Etcd is the key-value store that holds the whole state of the cluster: which pods should exist, their configuration, and their current status. If etcd is lost without a backup, the cluster cannot be rebuilt from its own records, so it is backed up and tested regularly.
What does the kubelet do?
The kubelet is the agent on each worker node. It receives pod descriptions from the API server, starts the containers through the runtime, checks their health, and reports status back. When a container stops, the kubelet reports it so the control plane can start a replacement.
How do pods talk to each other?
Each pod gets its own address, and a CNI plug-in connects pods across nodes so they can reach each other directly. Services give a stable address to a group of pods, and an Ingress routes outside traffic to the right Service by host name or path.
Do I need to run my own control plane?
Usually not at first. Managed clusters give you a working control plane run by the cloud provider, and your team can learn the workload parts on a real application without operating the control plane itself. Self-managed control planes make sense when you need control over placement or versions.
What is the difference between a Deployment and a StatefulSet?
A Deployment manages identical, replaceable pods and is the right choice for stateless services. A StatefulSet gives each replica a stable name and stable storage, which suits databases and other stateful workloads where identity and data must survive restarts.