← Categories

Kubernetes

YAML, cluster architecture, Pod, Deployment, Service: from basic objects to debugging real incidents.

How it works under the hood

layer-by-layer breakdown

What happens when you run kubectl apply -f pod.yaml

Twelve steps across four layers: DNS and TCP, TLS and HTTP, RBAC and admission, the write to etcd, the scheduler, kubelet with CRI and CNI. Every screen is built from real strace and tcpdump dumps and the apiserver audit log. Plus five branches where the path breaks: no permissions, a typo in a field, not enough CPU, the image won't pull.

open the deep dive →
Switching steps and layers in the kubectl apply deep dive

Kubernetes: basics

YAML, why Kubernetes, cluster architecture, your first Pod, and working with kubectl.

01 · theory
YAML for Kubernetes

The minimum syntax you need to read manifests.

4 min · intro
02 · theory
Why Kubernetes

What k8s does for you when a node goes down or traffic spikes.

4 min · intro
03 · theory
Cluster architecture

Who talks to whom in the cluster. A large diagram and short descriptions of each component.

5 min · intro
04 · theory
Your first Pod

What a Pod manifest consists of, what phases it goes through, and two ways to create one.

6 min · easy
05 · theory
Pod in depth: command, args, restartPolicy

How to override how a container starts, and what the cluster does after it finishes.

6 min · easy
06 · theory
kubectl explain and dry-run

How to get a ready manifest skeleton with one command and find the field you need without internet access.

6 min · easy
07 · theory
Imperative kubectl: run, create, expose, scale

The set of commands that create resources without YAML, and when each one fits.

8 min · medium
08 · theory
kubectl edit and immutable Pod fields

What you can change on a live Pod, what you can't, and how to work around the limit.

8 min · medium
09 · theory
Namespace: resource isolation

How a cluster is split into areas, which resources fall outside them, and the rules kubectl uses to pick a namespace.

7 min · easy
10 · theory
Labels and selectors

The labels cluster objects use to find each other, and how to filter them with -l.

6 min · easy
11 · theory
Terminal speed: alias, dry-run, fast delete

Tricks that save minutes in the terminal: a short alias, variables for flags, and vim set up for YAML.

6 min · easy

Kubernetes locally

Your own cluster on a laptop for practice: kind, k3d, minikube, and the rest.

01 · theory setup
Local Kubernetes: what to pick for your machine

The three families of local clusters, a straight-talking table of versions and licenses, and what to pick on macOS, Windows, and Linux.

9 min · intro
02 · theory setup
kubectl and kubeconfig: connecting to the cluster

How to install the right kubectl version, where the connection config lives, and how to avoid running a training command against prod.

7 min · intro
03 · theory setup
kind: a cluster made of containers

How kind brings up Kubernetes inside Docker, how to go multi-node, expose ports to the outside, and get a working Ingress.

9 min · easy
04 · theory setup
k3d: k3s in containers

The fastest local cluster you can get, what comes bundled with k3s out of the box, and why it's worth watching the project's release pace.

8 min · easy
05 · theory setup
minikube: drivers, ports, and addons

How minikube differs from kind and k3d, which Kubernetes version it actually gives you, and why ports deserve their own section here.

9 min · easy
06 · theory setup
GUI apps with built-in Kubernetes

Docker Desktop, Rancher Desktop, OrbStack, colima, and Podman Desktop: which cluster is inside, and where they stand on ports and licensing.

10 min · easy
07 · theory setup
What to install in a fresh cluster

metrics-server for kubectl top, the status of the archived ingress-nginx, Gateway API, and StorageClass.

10 min · easy
08 · theory setup
Beyond the laptop: k3s, MicroK8s, k0s, Talos

A cluster on your own server or VPS: what to install, which ports to open, and why kubeadm is worth touching only to understand the control plane.

9 min · medium

Kubernetes: workloads

ReplicaSet, Deployment, DaemonSet, Job, StatefulSet, HPA, and rollout strategies.

01 · theory
ReplicaSet: keeping N replicas

The controller that restores the right number of Pod copies on its own, and why it's almost never written by hand.

5 min · easy
02 · theory
Deployment: a controller on top of ReplicaSet

How Deployment manages a ReplicaSet, what the READY and UP-TO-DATE columns mean, and which fields real manifests set.

6 min · easy
03 · theory
Rolling update: updating without downtime

How Deployment shifts traffic from the old ReplicaSet to the new one, what maxSurge and maxUnavailable do, and where revisions come from.

7 min · medium
04 · theory
Deployment rollback

Where Kubernetes keeps the release history, and what kubectl rollout undo actually does to a ReplicaSet.

7 min · medium
05 · theory
DaemonSet: one Pod per node

The controller for agents that must run on every machine: how it counts replicas, and where nodeSelector and taints fit in.

5 min · easy
06 · theory
Job: a one-off task, start to finish

The controller for migrations and backups: completions, backoffLimit, restartPolicy, and why you can't clean up a Job by deleting its Pod.

5 min · easy
07 · theory
CronJob: scheduled tasks

The schedule runs in UTC, concurrencyPolicy, history limits, and other spots where a CronJob catches you off guard.

6 min · easy
08 · theory
StatefulSet and headless Service

The four guarantees of StatefulSet, per-pod DNS through clusterIP None, and how volumeClaimTemplates gives every replica its own disk.

8 min · medium
09 · theory
HorizontalPodAutoscaler

How HPA calculates the replica count it needs, why it stays silent without resources.requests, and what the behavior block does.

7 min · medium
10 · theory
Blue-Green deployment

Two environments and one Service acting as a switch: how to get an instant rollback, and what it costs you.

7 min · medium
11 · theory
Canary deployment

Traffic share through a replica ratio: how it works on a plain Service, where the precision breaks down, and when it's time for a service mesh.

8 min · medium

Kubernetes: configuration

Environment variables, ConfigMap, Secret, init containers, and sidecars.

Kubernetes: networking

Service, cluster DNS, Endpoints, NetworkPolicy, Ingress, and the Gateway API.

Kubernetes: storage

PersistentVolumeClaim, StorageClass, and dynamic volume provisioning.

Kubernetes: scheduling

requests and limits, nodeSelector, affinity, taints, and PodDisruptionBudget.

Kubernetes: security

securityContext, ServiceAccount, and RBAC.

Kubernetes: observability

Logs, kubectl top, and probes: how to tell what's happening with a Pod.

Kubernetes: Kustomize and Helm

How to stop copy-pasting manifests between environments.

01 · theory
Kustomize: manifests as one group

How kustomization.yaml assembles scattered YAML into one unit, and why Kustomize isn't a templating engine.

5 min · easy
02 · theory
Kustomize: transformers

namePrefix, labels, namespace, and image swaps: edits that cover the whole group of resources at once.

6 min · easy
03 · theory
Kustomize: patches

A targeted edit to a single resource: strategic merge patch, the JSON 6902 format, and how to pick a target.

6 min · easy
04 · theory
Kustomize: overlays for dev and prod

The base plus overlays pattern: one source of manifests and different environment configs without copy-paste.

6 min · medium
05 · theory
Kustomize: ConfigMap generator

configMapGenerator builds a ConfigMap from literals and files, and the hash in its name forces the Pod to restart on a change.

6 min · easy
06 · theory
Kustomize: Secret generator

secretGenerator, and an honest look at how base64 in a Secret protects nothing.

5 min · easy
07 · theory
Helm: chart, release, and the first install

What a chart is made of, what Helm 3 stores in the cluster after install, and how to configure a release with --set.

6 min · medium
08 · theory
Helm: a values file instead of --set

The order values are layered in, how several files get merged, and the rules Helm uses to merge dicts and lists.

5 min · easy
09 · theory
Helm: upgrade and rollback

Release revisions, the history stored in a Secret, rolling back with one command, and why upgrade sometimes drops values you set earlier.

6 min · medium

Kubernetes: debugging

ImagePullBackOff, CrashLoop, Pending, 502, and other common incidents.

01 · theory
ImagePullBackOff: the Pod can't pull the image

Why a Pod can't pull its image, where the real error text sits in describe, and what to do about it.

6 min · easy
02 · theory
livenessProbe restarts the container

How to tell a crashed app from a badly configured probe, and why you need to read logs with the --previous flag.

7 min · medium
03 · theory
Pod Pending because of CPU

What FailedScheduling means, how requests differ from limits, and why a node with 4 cores won't give you 4 cores.

7 min · medium
04 · theory
ConfigMap not found

Breaking down CreateContainerConfigError: where a Pod references external objects, and why it doesn't need a restart once the ConfigMap exists.

6 min · medium
05 · theory
Forbidden for a ServiceAccount

How to read a 403 from the apiserver word by word and check permissions with kubectl auth can-i instead of guessing.

7 min · medium
06 · theory
The Service isn't responding: selector mismatch

Why an empty endpoints list is the main symptom, how to check the selector against the Pod's labels, and which side to fix.

7 min · medium
07 · theory
Pod Running, but the client sees a 502

An incident where the Pod is healthy but the Service forwards traffic to a closed port.

7 min · hard
08 · theory
DNS doesn't resolve: when CoreDNS is down

How to tell a general DNS outage from a single Service's problem, and the chain to follow to find the cause.

6 min · hard
09 · theory
Rolling out a broken release: rollback and postmortem

Why the rollout went green while the service went down, and how to set up the probe so the next rollout catches itself.

8 min · hard
10 · theory
The ConfigMap is gone: bringing a service back up after a disaster

CreateContainerConfigError, restoring a config, and why Pods don't fix themselves.

6 min · medium
11 · theory
Weekend CrashLoop: an aggressive livenessProbe

Why the service crashes with no load at all, and how to tune probe settings for a cold start.

7 min · hard
12 · theory
RBAC locked down prod: CI gets Forbidden

How to read Forbidden errors from a pipeline, reproduce permissions with auth can-i, and build a minimal Role for a deploy.

7 min · hard

Kubernetes: going further

CRDs and operators, moving workloads between namespaces with no downtime.