Steven's Knowledge

Kubernetes

The industry-standard container orchestrator - from your first deployment to production-ready clusters

Kubernetes

Kubernetes (K8s) automates the deployment, scaling, and management of containerized applications. You describe the desired state of your workloads in YAML, and Kubernetes continuously reconciles reality with that description.

Why Kubernetes

Without K8sWith K8s
Manual restarts when a container diesSelf-healing — controllers restart failed pods
Manual scaling: SSH and start more containersDeclarative scale; HPA can do it automatically
Per-host service discovery hacksBuilt-in DNS and load balancing
Custom deploy scriptsRolling updates and rollbacks are a primitive
Vendor-specific automationSame API across every cloud and on-prem

Cluster Architecture

┌────────────────── Control Plane ──────────────────┐
│                                                    │
│  ┌──────────┐  ┌──────────┐  ┌──────────────────┐ │
│  │ kube-api │  │   etcd   │  │ controller-mgr   │ │
│  │  -server │  │ (kv DB)  │  │ + scheduler      │ │
│  └─────┬────┘  └──────────┘  └──────────────────┘ │
│        │ kubectl / clients                         │
└────────┼───────────────────────────────────────────┘

   ┌─────┴──────────────────────────────┐
   │                                    │
   ▼                                    ▼
┌─────────────────┐               ┌─────────────────┐
│  Worker Node 1  │   .........   │  Worker Node N  │
│  ┌───────────┐  │               │  ┌───────────┐  │
│  │  kubelet  │  │               │  │  kubelet  │  │
│  │ kube-proxy│  │               │  │ kube-proxy│  │
│  └───────────┘  │               │  └───────────┘  │
│  ┌──────┐┌──────┐│              │  ┌──────┐┌──────┐│
│  │ Pod  ││ Pod  ││              │  │ Pod  ││ Pod  ││
│  └──────┘└──────┘│              │  └──────┘└──────┘│
└─────────────────┘               └─────────────────┘

You write YAML → kubectl apply → the API server stores it in etcd → controllers notice the new desired state → the scheduler picks a node → kubelet on that node pulls the image and starts the pod.

Learning Path

Read in this order if you're new — each page builds on the previous one.

When NOT to Use Kubernetes

K8s is not free in operational complexity. Reach for it when:

  • You run many services, not just one.
  • You need rolling updates, autoscaling, and self-healing as table-stakes.
  • You're across multiple clouds or want to be.

Skip it (or use a managed PaaS like Cloud Run, App Runner, Fly.io) when:

  • You're a small team running one or two services.
  • Latency to "first deploy" matters more than orchestration features.
  • You don't have a person who'll own the cluster.

Kubernetes is the runtime. You still need Docker (or another container runtime) to build images, and a CI/CD system to ship them. K8s orchestrates what those images do once they exist.

On this page