Kubernetes
Learn Kubernetes in depth: how the control plane and nodes work, kubectl and the API, workloads, configuration, networking from Services to the Gateway API, storage, scheduling and resources, health and autoscaling, security, packaging and delivery, extending the API, and running clusters day to day.
What Kubernetes is and is notKubernetes is an API for desired state plus controllers that chase it. What that gives you, what it leaves to you, and when it is the wrong tool.The control planeThe API server, etcd, the scheduler and the controller manager: what each one does, how they talk only through the API, and how they stay up.Nodes, the kubelet and the container runtimeWhat runs on every worker: the kubelet that turns Pod objects into containers, the CRI runtime underneath, kube-proxy, and how a node proves it is alive.The Kubernetes API and object modelGroups, versions and resources, the fields every object carries, spec against status, resourceVersion and conflicts, generation, and owner references.Controllers and the reconcile loopHow a Kubernetes controller works: watch, cache, queue, reconcile. Why it is level-triggered, idempotent and stateless, and why a missed event costs nothing.Releases, version skew and feature gatesThree minor releases a year, about a year of patches each, how far components may drift apart, and how features move from alpha to GA behind feature gates.Local clusters: kind, minikube and k3dThree ways to run real Kubernetes on a laptop, how each one builds its nodes, and the chores that differ: local images, exposing Services, resets and CI.Managed Kubernetes: EKS, GKE and AKSWhat a cloud runs for you, what you still own, how EKS, GKE and AKS differ on nodes, networking, identity and upgrades, and what the control plane costs.kubectl, kubeconfig and contextsHow kubectl finds a cluster and proves who you are: clusters, users and contexts, merging kubeconfig files, credential plugins, and avoiding the wrong cluster.Imperative commands and declarative applykubectl create, scale and set against kubectl apply: the three ways to manage objects, how apply's three-way merge decides what to change, and where it bites.Server-side apply and field ownershipServer-side apply moves the merge into the API server and records who owns each field, so tools sharing an object get conflicts instead of silent overwrites.Exploring the API with kubectlFind any resource, field or permission from the terminal: api-resources, explain, verbose logging, raw requests, custom columns, JSONPath and auth can-i.Pods in depthWhat a Pod is, its phases, conditions and container states, restart policy and crash back-off, what you can change, and why you rarely create one directly.Init containers and sidecar containersContainers that run before your app, native sidecars that start first, run alongside, stop last and never block a Job, and how both change a Pod's requests.Labels, selectors, annotations and namespacesHow Kubernetes groups objects without hard links: labels and selectors, how controllers adopt and release Pods, annotations for everything else, and namespaces.Deployments and ReplicaSetsWhy a Deployment manages ReplicaSets rather than Pods, how pod-template-hash ties them together, revision history, scaling, and when to touch a ReplicaSet.Rolling updates and rollbacksHow a Deployment swaps Pods between ReplicaSets under maxSurge and maxUnavailable, how readiness gates each step, how stuck rollouts show, and how undo works.StatefulSetsPods with stable names, DNS and disks: ordered start and stop, volumeClaimTemplates, PVC retention, partitioned updates, and what a StatefulSet will not do.DaemonSetsOne Pod per node for log shippers, metrics agents, CNI and storage drivers: how DaemonSets pick nodes, their free tolerations, updates, and reaching them.Jobs and CronJobsRun-to-completion work: Job completions and parallelism, Indexed Jobs, retries and pod failure policies, clean-up, and CronJob schedules, zones and overlap.ConfigMapsKeep configuration out of the image: creating ConfigMaps, consuming them as env vars or files, how updates propagate, and immutable ConfigMaps.Secrets, and what they do not protectWhat a Kubernetes Secret really is: base64 not encryption, plaintext in etcd by default, encryption at rest and KMS, and the RBAC paths that leak it.The downward API and projected volumesHow a Pod learns its own name, labels, node and limits through the downward API, and how projected volumes combine config, secrets and short-lived tokens.External secrets and sealed secretsGetting secrets into a GitOps cluster without committing them: Sealed Secrets, the External Secrets Operator, the Secrets Store CSI driver and trade-offs.The Kubernetes network model and CNIWhy every Pod gets its own routable IP, the rules a cluster network must meet, and how the container runtime calls a CNI plugin to wire each Pod in.Services: ClusterIP, NodePort and LoadBalancerA stable virtual IP in front of changing Pods: how Service types build on each other, how cluster IPs are allocated, and the traffic policies that matter.EndpointSlices and kube-proxyHow a Service's selector becomes ready Pod addresses in EndpointSlices, and how kube-proxy turns them into iptables or nftables rules on every node.Cluster DNS and service discoveryHow Pods find Services by name: CoreDNS, the records Kubernetes publishes, the search path and ndots:5 in every Pod's resolv.conf, and dnsPolicy.Ingress and ingress controllersHTTP routing by host and path: the Ingress API, IngressClass, path matching and TLS, why controllers differ, and what ingress-nginx's retirement means.The Gateway APIIngress's successor: GatewayClass, Gateway and Routes split by role, typed routing instead of annotations, cross-namespace rules, and release channels.Network policiesFirewalling Pod traffic with NetworkPolicy: isolation by selection, additive allow rules, the AND-versus-OR trap, DNS egress, and ClusterNetworkPolicy.Service meshesWhat a service mesh adds: mutual TLS with workload identity, L7 traffic control and metrics, sidecar versus ambient data planes, and when it's worth it.Volumes and ephemeral storageStorage that lives and dies with a Pod: emptyDir on disk or in memory, why hostPath is dangerous, image and ephemeral volumes, and ephemeral-storage limits.PersistentVolumes and PersistentVolumeClaimsStorage that outlives Pods: how PVs and PVCs split supply from demand, how binding picks a volume, access modes, reclaim policies and protections.StorageClasses, CSI and dynamic provisioningHow a claim becomes a real disk on demand: StorageClasses, the default class, WaitForFirstConsumer, CSI drivers and sidecars, and VolumeAttributesClass.Volume snapshots, expansion and stateful dataDay-two operations on persistent data: growing a claim, recovering from a failed resize, CSI snapshots and group snapshots, cloning, and what a snapshot is not.Requests, limits and QoS classesWhat requests and limits really do: requests drive scheduling and CPU share, limits mean throttling or OOM kills, and how QoS classes decide who dies first.LimitRanges and ResourceQuotasNamespace guardrails enforced at admission: LimitRange defaults and bounds per container, ResourceQuota budgets per namespace, scopes, and their errors.How the scheduler places PodsInside kube-scheduler: the queue, filter and score plugins, binding, reading FailedScheduling messages, scheduling gates, and running other schedulers.Node selectors and affinitySteering Pods with labels: nodeSelector, required and preferred node affinity, pod affinity and anti-affinity by topology, and IgnoredDuringExecution.Taints and tolerationsHow nodes repel Pods: the three taint effects, matching tolerations, dedicated nodes, and how the node lifecycle controller taints failed nodes.Topology spread, priority and preemptionSpreading replicas evenly across zones and nodes with topology spread constraints, and how PriorityClasses let important Pods preempt others.Disruptions, drains and PodDisruptionBudgetsVoluntary and involuntary disruptions, how kubectl drain uses the Eviction API, how PodDisruptionBudgets refuse evictions, and the traps.Liveness, readiness and startup probesHow the kubelet decides a container is alive, ready or still starting, what each probe failure does, and probes that don't cause outages.Pod termination and graceful shutdownWhat happens between kubectl delete and a Pod disappearing: the grace period, preStop, SIGTERM, the endpoint race, and how to lose no requests on a rollout.The Horizontal Pod AutoscalerHow the HPA turns a metric into a replica count: the ratio formula, the 10% tolerance, scale-up limits, the five-minute scale-down window, and behavior.Vertical scaling and in-place resizeChanging how much CPU and memory a Pod gets: in-place resize through the resize subresource, its rules, and the Vertical Pod Autoscaler that picks the numbers.Event-driven autoscaling with KEDAScaling workers on queue depth, lag or a schedule with KEDA: how a ScaledObject becomes an HPA on an external metric, activation, and scaling to zero.The Cluster Autoscaler and KarpenterAdding and removing nodes automatically: the Cluster Autoscaler grows node groups for Pending Pods, Karpenter provisions nodes directly and consolidates.Authentication, users and service accountsHow the API server decides who is calling: client certificates, tokens, OIDC, why there is no User object, and short-lived, bound service account tokens.RBACRoles, ClusterRoles and bindings: how requests are authorized, namespace scoping, escalation prevention, aggregation, and permissions that are secretly admin.Security contexts and Pod Security StandardsWhat a container may do on its node: securityContext fields that drop root powers, and Pod Security Admission enforcing baseline and restricted per namespace.Admission control and policyThe step between authorization and storage: built-in admission plugins, CEL validating and mutating policies, webhooks, and Kyverno or Gatekeeper.Audit logging and cluster hardeningRecording who did what through the API server with an audit policy, reading audit events, and the control-plane settings that harden a cluster.Helm charts in depthWriting and operating Helm charts: named templates, values schemas, required values, hooks, release history in Secrets, rollbacks, and what Helm 4 changed.Kustomize in depthBeyond base and overlay: hashed generators, both patch styles, labels without selector damage, components, image and replica overrides, and Helm charts.Argo CD in practiceRunning Argo CD for many apps: AppProjects as guardrails, ApplicationSets instead of hand-made Applications, sync waves and hooks, sync options, and drift.Progressive delivery: canaries and blue-greenReleasing to a slice of traffic first: canaries by replica count or traffic weight, blue-green switches, automated analysis, and Argo Rollouts and Flagger.Custom resource definitionsAdding your own API types to Kubernetes: a CRD's schema, defaults, CEL validation rules, immutability, printer columns, the status subresource, and versioning.Operators and writing a controllerMaking a custom resource do something: a controller-runtime reconciler that owns a StatefulSet, writes status, heals drift and cleans up with a finalizer.Debugging Pods: describe, logs, events and ephemeral containersA working order for finding out why a Pod misbehaves: status, conditions and events, current and previous logs, and kubectl debug for images without a shell.Troubleshooting common failuresThe failures you will meet most: Pending Pods, image pull errors, crash loops and OOM kills, rollouts blocked by quota, empty Services, and NotReady nodes.Metrics and monitoringThe two metrics pipelines in a cluster: metrics-server for autoscaling and kubectl top, and Prometheus scraping components, kube-state-metrics and your apps.Logging architectureWhere container logs go on a node, how kubelet rotation loses them, node-level agents like Fluent Bit versus sidecars, and logs from the control plane.Upgrading a clusterKeeping up with three releases a year: the support window, skew rules, finding removed APIs first, then control plane, add-ons and nodes in order, with drains.Backup and disaster recoveryWhat to back up in a cluster and how: etcd snapshots for the control plane, Velero for namespaces and volumes, GitOps rebuilds, and rehearsed restores.Multi-tenancy and multi-clusterSharing clusters between teams with namespaces, RBAC, quotas and policy, when virtual or separate clusters are better, and managing many clusters.
How Kubernetes works
- What Kubernetes is and is notKubernetes is an API for desired state plus controllers that chase it. What that gives you, what it leaves to you, and when it is the wrong tool.
- The control planeThe API server, etcd, the scheduler and the controller manager: what each one does, how they talk only through the API, and how they stay up.
- Nodes, the kubelet and the container runtimeWhat runs on every worker: the kubelet that turns Pod objects into containers, the CRI runtime underneath, kube-proxy, and how a node proves it is alive.
- The Kubernetes API and object modelGroups, versions and resources, the fields every object carries, spec against status, resourceVersion and conflicts, generation, and owner references.
- Controllers and the reconcile loopHow a Kubernetes controller works: watch, cache, queue, reconcile. Why it is level-triggered, idempotent and stateless, and why a missed event costs nothing.
- Releases, version skew and feature gatesThree minor releases a year, about a year of patches each, how far components may drift apart, and how features move from alpha to GA behind feature gates.
Clusters and kubectl
- Local clusters: kind, minikube and k3dThree ways to run real Kubernetes on a laptop, how each one builds its nodes, and the chores that differ: local images, exposing Services, resets and CI.
- Managed Kubernetes: EKS, GKE and AKSWhat a cloud runs for you, what you still own, how EKS, GKE and AKS differ on nodes, networking, identity and upgrades, and what the control plane costs.
- kubectl, kubeconfig and contextsHow kubectl finds a cluster and proves who you are: clusters, users and contexts, merging kubeconfig files, credential plugins, and avoiding the wrong cluster.
- Imperative commands and declarative applykubectl create, scale and set against kubectl apply: the three ways to manage objects, how apply's three-way merge decides what to change, and where it bites.
- Server-side apply and field ownershipServer-side apply moves the merge into the API server and records who owns each field, so tools sharing an object get conflicts instead of silent overwrites.
- Exploring the API with kubectlFind any resource, field or permission from the terminal: api-resources, explain, verbose logging, raw requests, custom columns, JSONPath and auth can-i.
Workloads
- Pods in depthWhat a Pod is, its phases, conditions and container states, restart policy and crash back-off, what you can change, and why you rarely create one directly.
- Init containers and sidecar containersContainers that run before your app, native sidecars that start first, run alongside, stop last and never block a Job, and how both change a Pod's requests.
- Labels, selectors, annotations and namespacesHow Kubernetes groups objects without hard links: labels and selectors, how controllers adopt and release Pods, annotations for everything else, and namespaces.
- Deployments and ReplicaSetsWhy a Deployment manages ReplicaSets rather than Pods, how pod-template-hash ties them together, revision history, scaling, and when to touch a ReplicaSet.
- Rolling updates and rollbacksHow a Deployment swaps Pods between ReplicaSets under maxSurge and maxUnavailable, how readiness gates each step, how stuck rollouts show, and how undo works.
- StatefulSetsPods with stable names, DNS and disks: ordered start and stop, volumeClaimTemplates, PVC retention, partitioned updates, and what a StatefulSet will not do.
- DaemonSetsOne Pod per node for log shippers, metrics agents, CNI and storage drivers: how DaemonSets pick nodes, their free tolerations, updates, and reaching them.
- Jobs and CronJobsRun-to-completion work: Job completions and parallelism, Indexed Jobs, retries and pod failure policies, clean-up, and CronJob schedules, zones and overlap.
Configuration
- ConfigMapsKeep configuration out of the image: creating ConfigMaps, consuming them as env vars or files, how updates propagate, and immutable ConfigMaps.
- Secrets, and what they do not protectWhat a Kubernetes Secret really is: base64 not encryption, plaintext in etcd by default, encryption at rest and KMS, and the RBAC paths that leak it.
- The downward API and projected volumesHow a Pod learns its own name, labels, node and limits through the downward API, and how projected volumes combine config, secrets and short-lived tokens.
- External secrets and sealed secretsGetting secrets into a GitOps cluster without committing them: Sealed Secrets, the External Secrets Operator, the Secrets Store CSI driver and trade-offs.
Networking
- The Kubernetes network model and CNIWhy every Pod gets its own routable IP, the rules a cluster network must meet, and how the container runtime calls a CNI plugin to wire each Pod in.
- Services: ClusterIP, NodePort and LoadBalancerA stable virtual IP in front of changing Pods: how Service types build on each other, how cluster IPs are allocated, and the traffic policies that matter.
- EndpointSlices and kube-proxyHow a Service's selector becomes ready Pod addresses in EndpointSlices, and how kube-proxy turns them into iptables or nftables rules on every node.
- Cluster DNS and service discoveryHow Pods find Services by name: CoreDNS, the records Kubernetes publishes, the search path and ndots:5 in every Pod's resolv.conf, and dnsPolicy.
- Ingress and ingress controllersHTTP routing by host and path: the Ingress API, IngressClass, path matching and TLS, why controllers differ, and what ingress-nginx's retirement means.
- The Gateway APIIngress's successor: GatewayClass, Gateway and Routes split by role, typed routing instead of annotations, cross-namespace rules, and release channels.
- Network policiesFirewalling Pod traffic with NetworkPolicy: isolation by selection, additive allow rules, the AND-versus-OR trap, DNS egress, and ClusterNetworkPolicy.
- Service meshesWhat a service mesh adds: mutual TLS with workload identity, L7 traffic control and metrics, sidecar versus ambient data planes, and when it's worth it.
Storage
- Volumes and ephemeral storageStorage that lives and dies with a Pod: emptyDir on disk or in memory, why hostPath is dangerous, image and ephemeral volumes, and ephemeral-storage limits.
- PersistentVolumes and PersistentVolumeClaimsStorage that outlives Pods: how PVs and PVCs split supply from demand, how binding picks a volume, access modes, reclaim policies and protections.
- StorageClasses, CSI and dynamic provisioningHow a claim becomes a real disk on demand: StorageClasses, the default class, WaitForFirstConsumer, CSI drivers and sidecars, and VolumeAttributesClass.
- Volume snapshots, expansion and stateful dataDay-two operations on persistent data: growing a claim, recovering from a failed resize, CSI snapshots and group snapshots, cloning, and what a snapshot is not.
Scheduling and resources
- Requests, limits and QoS classesWhat requests and limits really do: requests drive scheduling and CPU share, limits mean throttling or OOM kills, and how QoS classes decide who dies first.
- LimitRanges and ResourceQuotasNamespace guardrails enforced at admission: LimitRange defaults and bounds per container, ResourceQuota budgets per namespace, scopes, and their errors.
- How the scheduler places PodsInside kube-scheduler: the queue, filter and score plugins, binding, reading FailedScheduling messages, scheduling gates, and running other schedulers.
- Node selectors and affinitySteering Pods with labels: nodeSelector, required and preferred node affinity, pod affinity and anti-affinity by topology, and IgnoredDuringExecution.
- Taints and tolerationsHow nodes repel Pods: the three taint effects, matching tolerations, dedicated nodes, and how the node lifecycle controller taints failed nodes.
- Topology spread, priority and preemptionSpreading replicas evenly across zones and nodes with topology spread constraints, and how PriorityClasses let important Pods preempt others.
- Disruptions, drains and PodDisruptionBudgetsVoluntary and involuntary disruptions, how kubectl drain uses the Eviction API, how PodDisruptionBudgets refuse evictions, and the traps.
Health and autoscaling
- Liveness, readiness and startup probesHow the kubelet decides a container is alive, ready or still starting, what each probe failure does, and probes that don't cause outages.
- Pod termination and graceful shutdownWhat happens between kubectl delete and a Pod disappearing: the grace period, preStop, SIGTERM, the endpoint race, and how to lose no requests on a rollout.
- The Horizontal Pod AutoscalerHow the HPA turns a metric into a replica count: the ratio formula, the 10% tolerance, scale-up limits, the five-minute scale-down window, and behavior.
- Vertical scaling and in-place resizeChanging how much CPU and memory a Pod gets: in-place resize through the resize subresource, its rules, and the Vertical Pod Autoscaler that picks the numbers.
- Event-driven autoscaling with KEDAScaling workers on queue depth, lag or a schedule with KEDA: how a ScaledObject becomes an HPA on an external metric, activation, and scaling to zero.
- The Cluster Autoscaler and KarpenterAdding and removing nodes automatically: the Cluster Autoscaler grows node groups for Pending Pods, Karpenter provisions nodes directly and consolidates.
Security
- Authentication, users and service accountsHow the API server decides who is calling: client certificates, tokens, OIDC, why there is no User object, and short-lived, bound service account tokens.
- RBACRoles, ClusterRoles and bindings: how requests are authorized, namespace scoping, escalation prevention, aggregation, and permissions that are secretly admin.
- Security contexts and Pod Security StandardsWhat a container may do on its node: securityContext fields that drop root powers, and Pod Security Admission enforcing baseline and restricted per namespace.
- Admission control and policyThe step between authorization and storage: built-in admission plugins, CEL validating and mutating policies, webhooks, and Kyverno or Gatekeeper.
- Audit logging and cluster hardeningRecording who did what through the API server with an audit policy, reading audit events, and the control-plane settings that harden a cluster.
Packaging and delivery
- Helm charts in depthWriting and operating Helm charts: named templates, values schemas, required values, hooks, release history in Secrets, rollbacks, and what Helm 4 changed.
- Kustomize in depthBeyond base and overlay: hashed generators, both patch styles, labels without selector damage, components, image and replica overrides, and Helm charts.
- Argo CD in practiceRunning Argo CD for many apps: AppProjects as guardrails, ApplicationSets instead of hand-made Applications, sync waves and hooks, sync options, and drift.
- Progressive delivery: canaries and blue-greenReleasing to a slice of traffic first: canaries by replica count or traffic weight, blue-green switches, automated analysis, and Argo Rollouts and Flagger.
Extending Kubernetes
- Custom resource definitionsAdding your own API types to Kubernetes: a CRD's schema, defaults, CEL validation rules, immutability, printer columns, the status subresource, and versioning.
- Operators and writing a controllerMaking a custom resource do something: a controller-runtime reconciler that owns a StatefulSet, writes status, heals drift and cleans up with a finalizer.
Operating clusters
- Debugging Pods: describe, logs, events and ephemeral containersA working order for finding out why a Pod misbehaves: status, conditions and events, current and previous logs, and kubectl debug for images without a shell.
- Troubleshooting common failuresThe failures you will meet most: Pending Pods, image pull errors, crash loops and OOM kills, rollouts blocked by quota, empty Services, and NotReady nodes.
- Metrics and monitoringThe two metrics pipelines in a cluster: metrics-server for autoscaling and kubectl top, and Prometheus scraping components, kube-state-metrics and your apps.
- Logging architectureWhere container logs go on a node, how kubelet rotation loses them, node-level agents like Fluent Bit versus sidecars, and logs from the control plane.
- Upgrading a clusterKeeping up with three releases a year: the support window, skew rules, finding removed APIs first, then control plane, add-ons and nodes in order, with drains.
- Backup and disaster recoveryWhat to back up in a cluster and how: etcd snapshots for the control plane, Velero for namespaces and volumes, GitOps rebuilds, and rehearsed restores.
- Multi-tenancy and multi-clusterSharing clusters between teams with namespaces, RBAC, quotas and policy, when virtual or separate clusters are better, and managing many clusters.