From Docker to Kubernetes: a quick comparison
With Docker you can run a single container:Horizontal Pod Autoscaling (HPA) requires metrics to be available. Install a metrics provider like
metrics-server or another monitoring backend for CPU/memory-based autoscaling to work.Container runtimes and dockershim deprecation
Kubernetes orchestrates containers on nodes using a container runtime. Historically, Docker Engine was frequently used via the dockershim integration, but Kubernetes has removed dockershim in recent releases. Common runtimes now includecontainerd and CRI-O. Docker-formatted images remain fully supported.
Cluster basics: nodes and clusters
A node is a physical or virtual machine that runs the Kubernetes node components and your containers. Running multiple nodes increases availability — if one node fails, workloads can be rescheduled to other nodes.
Control plane (formerly “master”): what it runs
The control plane is responsible for maintaining cluster state and orchestrating workloads across worker nodes. When you install Kubernetes, you install a set of components including the API server, etcd, controller manager, scheduler, kubelets, and a container runtime.
kubectl: the command-line interface
kubectl is the main CLI to interact with the Kubernetes API. Use it to create, update, inspect, and delete resources.
Common kubectl commands:
Tip: The behavior of
kubectl run changed in recent versions. For creating and managing long-lived workloads, prefer kubectl create deployment or declarative workflows using kubectl apply -f <manifest.yaml>. Use kubectl run for quick, ad-hoc pods.Quick reference: when to use these Kubernetes features
- Deployments: manage stateless application releases and rolling updates.
- StatefulSets: manage stateful workloads that require stable network IDs or storage.
- DaemonSets: ensure a pod runs on all (or some) nodes.
- Services: expose sets of pods as a network service (ClusterIP, NodePort, LoadBalancer).
- ConfigMaps / Secrets: separate configuration and sensitive data from container images.
- Horizontal Pod Autoscaler (HPA): scale replicas based on observed CPU/memory or custom metrics.
Further learning and references
- Kubernetes official docs: https://kubernetes.io/docs/
- Kubernetes Basics: https://kubernetes.io/docs/concepts/overview/what-is-kubernetes/
- Kubernetes for the Absolute Beginners - Hands-on Tutorial
- Kubernetes Networking Deep Dive
- Certified Kubernetes Administrator (CKA)