Kubernetes (K8s)
Kubernetes (K8s) is an open-source platform originally developed by Google and donated to the CNCF (Cloud Native Computing Foundation) that automates the operational tasks of running containerized workloads at scale: scheduling containers onto available nodes, restarting failed containers, scaling replicas based on load, rolling out updates with zero downtime, and managing service discovery and load balancing; A Kubernetes cluster consists of a control plane (API server, etcd key-value store, scheduler, controller manager) and one or more worker nodes; The pragmatic guidance for most builders is: use Docker Compose until you feel genuine pain that Kubernetes would solve
Kubernetes (K8s) is an open-source platform originally developed by Google and donated to the CNCF (Cloud Native Computing Foundation) that automates the operational tasks of running containerized workloads at scale: scheduling containers onto available nodes, restarting failed containers, scaling replicas based on load, rolling out updates with zero downtime, and managing service discovery and load balancing. For the majority of individual builders and small teams, Kubernetes is significantly more complex than necessary and Docker Compose is the appropriate tool.
How it works
A Kubernetes cluster consists of a control plane (API server, etcd key-value store, scheduler, controller manager) and one or more worker nodes. Operators declare desired state using YAML manifests (Deployments, Services, ConfigMaps, etc.) submitted to the API server. The scheduler assigns Pods (groups of containers) to nodes; kubelet on each node ensures the desired Pods are running; and controllers reconcile actual state with desired state continuously. Managed Kubernetes services (GKE, EKS, AKS) abstract the control plane operations.
Key facts
- K3s and MicroK8s: Lightweight Kubernetes distributions designed for single-node or homelab deployments reduce the operational complexity for small setups
- Learning curve: Kubernetes introduces 20+ new abstractions (Pod, Deployment, Service, Ingress, ConfigMap, Secret, PVC, etc.); expect weeks of learning before productive use
- When it makes sense: Kubernetes adds value when running 10+ services, needing horizontal autoscaling, or requiring multi-node failover
For builders
The pragmatic guidance for most builders is: use Docker Compose until you feel genuine pain that Kubernetes would solve. Common legitimate reasons to graduate to Kubernetes include needing to span multiple physical nodes, requiring fine-grained pod autoscaling, or joining a team that standardizes on Kubernetes. Running a single-node K3s instance in a homelab for learning purposes is entirely reasonable; running full Kubernetes for a personal blog is not.
Sources
- Docker, Inc. Docker Engine documentation. docs.docker.com
- Kubernetes. Core concepts documentation. kubernetes.io
- Open Container Initiative. OCI Image and Runtime specifications. opencontainers.org
- CNCF. Graduated and incubating cloud-native projects. cncf.io
- NIST SP 800-190. Application Container Security Guide. nist.gov