Kubernetes Architecture

The control plane, worker nodes and core objects that run containers at scale.

Intermediate10 min read3 interview questions

Kubernetes is a container orchestrator. You declare the desired state — “run three replicas of this image, reachable on port 80” — and Kubernetes continuously works to make reality match it.

A cluster has a control plane that makes decisions and worker nodes that run your containers inside pods.

Diagram

Control planeWorker nodesdesired staterunsAPI serverkubectl talks hereetcdcluster stateSchedulerplaces podsController managerreconciles statekubeletnode agentkube-proxyservice networkingPodapp containerPodapp + sidecar
The control plane stores and reconciles desired state; kubelets on each node run the pods.

Key concepts

Pod
The smallest deployable unit: one or more containers sharing network and storage.
Deployment
Manages replica sets of pods and rolling updates.
Service
A stable virtual IP and DNS name that load-balances to matching pods.
ConfigMap & Secret
Configuration and sensitive values injected into pods.
Horizontal Pod Autoscaler
Adds or removes pods based on CPU, memory or custom metrics.
Namespace
A logical partition of the cluster for teams or environments.
Probes
Liveness, readiness and startup checks that drive restarts and traffic.

Trade-offs

Benefits

  • Self-healing: failed pods are replaced automatically
  • Declarative, version-controlled deployments
  • Portable across clouds and on-premises

Costs

  • Steep learning curve and many moving parts
  • Overkill for a handful of services
  • Security and networking need careful configuration

Use it when

  • Many containerised services needing scaling, rollouts and self-healing
  • Platform teams providing a shared runtime

Common mistakes

  • No resource requests and limits, so pods starve each other
  • Missing readiness probes, so traffic hits pods that are still starting
  • Storing secrets in plain ConfigMaps

Interview questions

Q1What happens when a node fails?
The node controller marks it NotReady; after a timeout its pods are evicted and the Deployment’s ReplicaSet creates replacements that the scheduler places on healthy nodes.
Q2Deployment vs StatefulSet?
Deployments run interchangeable stateless pods. StatefulSets give pods stable names, ordered start-up and their own persistent volumes — used for databases and brokers.
Q3Would you choose Kubernetes for a team of three running two services?
Usually not. A managed PaaS such as Azure App Service or Container Apps gives scaling and deployments with far less operational work.