DevOps & Tools
Run containers in production on Kubernetes: workloads, networking, config, security, scaling and delivery.
A practical path from your first Pod to operating and extending clusters. It covers workloads, Services and the Gateway API, configuration and secrets, resource tuning, security, observability, autoscaling, scheduling, storage, release strategies and custom controllers. It suits backend and DevOps engineers who already know containers. Each subject links the official documentation.
The subjects follow the roadmap.sh Kubernetes roadmap.
Kubernetes is an open-source system that runs containers across a fleet of machines and keeps them in the state you declared. You describe what should run in YAML objects, and controllers continuously reconcile reality toward that description, restarting, rescheduling and replacing things as needed.
A control plane (API server, etcd, scheduler, controller manager) stores desired state and drives worker nodes, where the kubelet and a container runtime actually start the containers.
Self-healing, rolling updates, service discovery, bin-packing and a uniform API across clouds. The price is real operational complexity, so it pays off for many services and teams more than for a single small app.
Cluster, node, namespace, Pod, controller, label and selector, manifest, desired state and reconciliation loop: the words every other page assumes you know.
Docker Swarm and HashiCorp Nomad are simpler orchestrators; serverless container platforms such as Cloud Run, ECS on Fargate or Azure Container Apps hide the cluster entirely.
Kubernetes schedules containers, so you need to be fluent with images, registries and runtimes first. Know how to write a small, reproducible Dockerfile, tag and push an image, and how namespaces and cgroups isolate a process. Kubernetes talks to runtimes like containerd through the Container Runtime Interface, not to Docker itself.
Get a cluster to practise on and learn kubectl, the CLI that reads your kubeconfig and talks to the API server. A local cluster is enough for most of this roadmap; a managed one teaches you load balancers, storage classes and cloud IAM.
kind runs nodes as Docker containers and is ideal for CI; minikube adds handy addons; k3s is a lightweight distribution that also suits small servers and edge devices.
GKE, EKS and AKS run the control plane for you. Compare upgrade cadence, control-plane pricing, node autoscaling options, networking plugins and how cloud IAM maps onto Kubernetes identities.
Create a Deployment, expose it with a Service, then scale and update it. Use kubectl apply -f, get, describe, logs and port-forward until they are muscle memory.
Workload objects wrap Pods with a controller that keeps the right number of copies running. Pick the controller by the shape of the work: stateless and long-running, stateful with stable identity, or run-to-completion.
The smallest schedulable unit: one or more containers sharing a network namespace and volumes. Pods are disposable; you almost never create them directly, and init or sidecar containers handle setup and helpers.
Keeps a set number of Pods matching a label selector alive. Deployments create and manage ReplicaSets for you, one per revision, which is how rollbacks work.
The default for stateless apps: declarative replicas, rolling updates tuned with maxSurge and maxUnavailable, revision history and kubectl rollout undo.
Pods with stable names (db-0, db-1), stable DNS through a headless Service and a PersistentVolumeClaim each, started and stopped in order. Used for databases and clustered systems.
Run Pods until a number of them succeed, with retries via backoffLimit and parallelism controls. CronJobs create Jobs on a schedule; set concurrencyPolicy so slow runs do not pile up.
Every Pod gets its own IP, and every Pod can reach every other without NAT; a CNI plugin implements that model. Services give a changing set of Pods one stable virtual IP and DNS name, and Ingress or the Gateway API bring outside traffic in.
CNI plugins such as Calico or Cilium wire Pod IPs across nodes. CoreDNS resolves svc.namespace.svc.cluster.local, and kube-proxy (or eBPF) turns Service IPs into real Pod endpoints.
NodePort opens a port on every node, LoadBalancer asks the cloud for one, and Ingress routes HTTP by host and path through a controller such as ingress-nginx.
Inside the cluster a Service spreads connections across ready endpoints, not individual requests, so long-lived HTTP/2 or gRPC connections can stick to one Pod. Readiness probes decide who receives traffic.
The successor to Ingress: role-oriented GatewayClass, Gateway and HTTPRoute objects with header matching, traffic splitting and cross-namespace routing built in rather than bolted on with annotations.
Keep configuration out of the image so the same image runs in every environment. ConfigMaps and Secrets are mounted as files or exposed as environment variables; mounted files update in place, environment variables only change on restart.
Store non-secret key/value pairs or whole files and consume them with envFrom, valueFrom or a volume. Mark them immutable and roll a new name when you want a controlled rollout.
Secrets are only base64-encoded by default; enable encryption at rest, restrict them with RBAC, and consider External Secrets Operator or Sealed Secrets to source them from a real vault.
The scheduler places Pods by their requests, and the kubelet enforces their limits. Getting these numbers right decides your bill, your density and whether Pods get throttled or OOM-killed under load.
Requests reserve CPU and memory for scheduling; limits cap usage. Exceeding a memory limit kills the container, exceeding CPU only throttles it. Requests and limits together set the Pod QoS class.
ResourceQuota caps total CPU, memory and object counts per namespace; LimitRange sets per-container defaults so Pods without requests still get sane values.
metrics-server powers kubectl top; compare real usage with requests over time and right-size them. Over-requesting wastes nodes, under-requesting causes noisy neighbours and evictions.
Cluster security is layered: who may call the API, what Pods may do on a node, and which Pods may talk to each other. Defaults are permissive, so least privilege has to be configured deliberately.
Roles and ClusterRoles list allowed verbs on resources; RoleBindings attach them to users, groups or ServiceAccounts. Check what someone can do with kubectl auth can-i --as.
NetworkPolicies restrict Pod ingress and egress by labels, namespaces and CIDRs. Start with default-deny per namespace, and confirm your CNI actually enforces policies.
Run as non-root, drop capabilities, use a read-only root filesystem and a seccomp profile via securityContext. Pod Security Admission enforces the baseline or restricted standard per namespace.
Pods come and go, so telemetry has to be collected centrally and labelled by namespace, workload and Pod. The usual stack is Prometheus for metrics, a log shipper into a store such as Loki or Elasticsearch, and OpenTelemetry for traces.
Write to stdout and stderr; the kubelet keeps the files and kubectl logs --previous shows the last crash. A DaemonSet agent such as Fluent Bit ships them off the node before rotation removes them.
Prometheus scrapes /metrics from apps, kubelets, kube-state-metrics and node-exporter. Alert on symptoms such as error rate and latency rather than on every CPU spike.
Distributed traces follow one request across services. Instrument with OpenTelemetry SDKs and run the OpenTelemetry Collector in the cluster to export spans to a backend like Jaeger or Tempo.
Liveness probes restart stuck containers, readiness probes take Pods out of Services, startup probes protect slow boots. Events from kubectl get events explain most failed rollouts.
The backends that store and query telemetry: Prometheus or Thanos for metrics, Loki or Elasticsearch for logs, Jaeger or Tempo for traces, and Grafana to visualise all of them in one place.
Kubernetes scales on two axes: Pods (more replicas or bigger ones) and nodes (more machines). Pod autoscaling only works when requests are set, and node autoscaling reacts to Pods that cannot be scheduled.
Adjusts replica count to hold a target such as 70% CPU utilisation or a custom metric. Tune behavior stabilisation windows to avoid flapping; KEDA extends it with event-driven scalers.
Recommends or applies CPU and memory requests based on observed usage. Run it in recommendation mode first, and avoid combining it with an HPA on the same CPU metric.
Cluster Autoscaler grows node groups when Pods are Pending and shrinks underused ones; Karpenter provisions right-sized nodes directly. PodDisruptionBudgets limit how aggressively nodes get drained.
kube-scheduler filters nodes that can fit a Pod, scores the rest and binds the Pod to the best one. You steer it with node selectors, affinity, taints, spread constraints and priorities.
nodeSelector and node affinity pin Pods to labelled nodes; Pod affinity and anti-affinity place Pods near or away from each other, for example one replica per zone.
A taint repels Pods from a node unless they tolerate it. Use them to reserve GPU or system nodes; NoExecute also evicts Pods already running there.
Spread replicas evenly across zones or nodes with maxSkew and a topologyKey, so one zone outage cannot take every copy of a service down.
PriorityClasses rank Pods; when the cluster is full the scheduler may preempt lower-priority Pods to fit a more important one. Keep the built-in system classes for cluster-critical components.
The kubelet evicts Pods when a node runs low on memory or disk, starting with BestEffort ones. API-initiated evictions during drains respect PodDisruptionBudgets.
Container filesystems vanish with the container, so data that matters lives in volumes. PersistentVolumeClaims request storage, StorageClasses provision it dynamically, and access modes decide how many nodes can mount it.
The Container Storage Interface lets storage vendors ship drivers outside Kubernetes core. A driver handles provisioning, attaching, resizing and snapshots for EBS, Persistent Disk, Ceph and others.
Combine StatefulSets, per-replica PVCs and a headless Service, and plan backups, failover and upgrades. For databases an operator such as CloudNativePG usually beats hand-written manifests.
How changes reach the cluster safely: packaging manifests, automating delivery, and releasing new versions gradually with a fast way back. Most teams combine Helm or Kustomize, a GitOps controller and a progressive delivery tool.
CI builds, tests, scans and pushes an image tagged by commit; CD updates the manifests. Pin images by digest and give the pipeline a narrowly scoped ServiceAccount, never cluster-admin.
A controller in the cluster pulls desired state from Git and continuously reconciles it, so Git is the audit log and rollback is a revert. Argo CD and Flux are the two main tools.
Helm packages templated manifests as versioned charts with a values.yaml for each environment. helm upgrade --install and helm rollback manage releases; Kustomize is the template-free alternative.
Send a small share of traffic to the new version, watch metrics, then promote or abort. Argo Rollouts and Flagger automate the steps and the analysis.
Run the new version beside the old one and switch the Service selector or route all at once. Rollback is instant, but you need double capacity during the switch.
The Deployment default: replace Pods a few at a time while readiness probes gate progress. kubectl rollout status, history and undo watch and reverse a release.
Kubernetes is built to be extended: you can add your own resource types, write controllers that reconcile them, and plug into scheduling and admission. This is how operators and most of the cloud-native ecosystem are built.
Register a new API type with an OpenAPI schema, validation rules and versions; then kubectl get yourthing works like any built-in object.
A controller watches objects and reconciles real state toward their spec, idempotently. Kubebuilder and controller-runtime scaffold the Go code; a CRD plus controller is an operator.
Run a second scheduler selected by schedulerName, or write scheduling framework plugins for filter and score steps. Needed for batch and GPU gang scheduling, rarely otherwise.
Beyond CRDs: validating and mutating admission webhooks, the API aggregation layer, and the CNI, CSI and CRI plugin interfaces. Policy engines like Kyverno and Gatekeeper are built on webhooks.
Running the cluster itself: building control planes, adding and upgrading nodes, and managing many clusters at once. On a managed service most of this is done for you, so learn it to understand failures even if you never self-host.
Self-hosting means owning etcd backups, certificates, upgrades every few months and on-call for the control plane. Usually worth it only for on-premises, air-gapped or very cost-sensitive fleets.
kubeadm init bootstraps the API server, etcd, scheduler and controller manager; use three control-plane nodes for HA. Kubernetes The Hard Way shows every piece manually.
Join nodes with kubeadm join, label them for scheduling, and kubectl cordon and drain before maintenance. Upgrade the control plane first, then nodes one minor version at a time.
Separate clusters per region or environment limit blast radius. Cluster API provisions clusters declaratively, and GitOps tools fan configuration out to all of them.