Kubernetes Architecture
The control plane, worker nodes and core objects that run containers at scale.
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
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.
Related lessons
Cloud & Delivery
Kubernetes Ingress vs Gateway API
Two ways to bring outside traffic into a cluster, and why Gateway API is the successor.
Cloud & DeliveryDeployment Strategies
Rolling, blue-green, canary and feature flags — release without downtime and roll back fast.
Scalability & PerformanceVertical vs Horizontal Scaling
Make one machine bigger, or add more machines — the first decision in every scaling story.