Kubernetes Introduction
Kubernetes Introduction
Section titled “Kubernetes Introduction”Kubernetes (K8s) is an open-source container orchestration platform. It automates deploying, scaling, and managing containerised applications across a cluster of machines.
Why Kubernetes Exists
Section titled “Why Kubernetes Exists”Docker solves packaging. Kubernetes solves operations at scale.
Without orchestration you face:
- Manual restarts when containers crash
- No built-in load balancing across replicas
- No rolling deployments without downtime
- No automatic scaling under load
Kubernetes handles all of this declaratively — you describe desired state, and the control plane makes it reality.
Architecture Overview
Section titled “Architecture Overview”Control Plane (manages the cluster)├── API Server — single entry point for all operations├── etcd — distributed key-value store for cluster state├── Scheduler — assigns pods to nodes based on resources└── Controller Manager — reconciliation loops (deployments, replicas, etc.)
Worker Nodes (run the workloads)├── kubelet — agent that runs pods on the node├── kube-proxy — network rules and service routing└── Container Runtime — containerd or DockerKey Concepts
Section titled “Key Concepts”| Concept | What it is |
|---|---|
| Pod | Smallest deployable unit — one or more containers |
| Node | A machine (VM or physical) in the cluster |
| Cluster | One control plane + multiple worker nodes |
| Namespace | Logical partition within a cluster |
| Deployment | Manages replicas and rolling updates of pods |
| Service | Stable network endpoint in front of pods |
| ConfigMap / Secret | External configuration and sensitive values |
| Ingress | HTTP routing from outside the cluster to services |
Kubernetes vs Plain Docker
Section titled “Kubernetes vs Plain Docker”| Concern | Docker alone | Kubernetes |
|---|---|---|
| Container restart on crash | Manual or restart policy | Automatic |
| Load balancing | Manual with nginx/HAProxy | Built-in via Services |
| Rolling updates | Manual scripting | kubectl rollout |
| Auto-scaling | Not built-in | HorizontalPodAutoscaler |
| Multi-host networking | Complex setup | Built-in overlay network |
Use plain Docker for local development and single-host deployments. Use Kubernetes when you need multi-node workloads, auto-scaling, or zero-downtime deployments.
When to Use Kubernetes
Section titled “When to Use Kubernetes”Good fit:
- Microservices with independent scaling requirements
- High-availability production workloads
- Teams that ship frequently and need zero-downtime deploys
Might be overkill:
- Small single-service apps
- Prototypes or internal tools
- Teams without operational capacity to maintain a cluster (consider managed alternatives like Cloud Run or Azure Container Apps)
Managed Kubernetes Options
Section titled “Managed Kubernetes Options”All major clouds offer managed control planes so you only manage worker nodes:
- GKE — Google Kubernetes Engine
- AKS — Azure Kubernetes Service
- EKS — Amazon Elastic Kubernetes Service
Next Steps
Section titled “Next Steps”- Pods — the smallest deployable unit
- Deployments — running and updating replicas
- Services — exposing pods on the network
- kubectl Commands — essential CLI reference