Interview Prep/DevOps Fundamentals/Containers & Kubernetes basics

Explain the Kubernetes architecture in simple terms.

BeginnerConceptContainers & Kubernetes basics
Answer

In one line: A Kubernetes cluster has a control plane (the brain that makes decisions) and worker nodes (the machines that run your containers).

Control plane components:

  1. kube-apiserver — the front door. Every request (kubectl, controllers, nodes) goes through it.
  2. etcd — a key-value database storing the cluster's entire state (desired and current). Back it up!
  3. kube-scheduler — picks a node for each new pod, based on resource requests, affinity, taints and so on.
  4. kube-controller-manager — runs controllers that keep reality matching the desired state (for example the ReplicaSet controller creates pods when there are too few).
  5. cloud-controller-manager — talks to the cloud (creates load balancers, attaches volumes).

Worker node components:

  1. kubelet — the agent on each node; makes sure the containers for its pods are running and reports status.
  2. Container runtime — actually runs containers (containerd, CRI-O).
  3. kube-proxy — sets up networking rules so Services route traffic to the right pods (some clusters replace it with eBPF tools like Cilium).

What happens when you deploy (the flow):

  1. kubectl apply -f deployment.yaml → sent to the API server.
  2. The API server validates it and stores it in etcd.
  3. The Deployment controller creates a ReplicaSet; the ReplicaSet controller creates Pod objects.
  4. The scheduler assigns each pod to a node.
  5. The kubelet on that node tells the container runtime to pull the image and start the container.
  6. kubelet reports status back; kube-proxy/CNI make the pod reachable through its Service.

In managed Kubernetes (EKS, AKS, GKE), the cloud provider runs the control plane for you; you manage the worker nodes (or use serverless nodes like Fargate or GKE Autopilot).

Tip for interviews: walking through the "kubectl apply" flow step by step is the best way to prove you understand the architecture.

All DevOps Fundamentals questions

More on Containers & Kubernetes basics