Sachin Chaurasiya

Path 07 · learning path

Kubernetes Operations

Operating workloads from the kubectl side: choosing between Deployments, StatefulSets, DaemonSets and Jobs, making probes and resource limits mean something, debugging genuinely broken pods and Services, following a request through a Service and DNS, and scaling by hand and with an autoscaler. The security layers are the Secure Kubernetes path.

Parts
5 parts
Total reading time
~51 min to read
Difficulty
intermediate

What you will learn

  • Pick the right controller for a workload and read its state with kubectl get, describe and rollout
  • Configure readiness, liveness and startup probes, requests and limits, and recognise OOMKilled, throttling and Pending
  • Debug CrashLoopBackOff, ImagePullBackOff, configuration errors and empty Services with a repeatable process
  • Trace a request through a Service, its EndpointSlice and DNS, and scale a Deployment with a real HorizontalPodAutoscaler

Before you start

Knowledge assumed

  • What a container is and how to run one
  • Basic familiarity with Pods and Deployments; the security side is the Secure Kubernetes path

Hands-on environment

  • A disposable cluster: kind 0.31 with two worker nodes is what every part uses
  • kubectl 1.32 or newer

Each part names what it needs. Nothing has to be installed before part 1.

The path

5 parts, in order

Each part states what it assumes from the previous one, so you can also jump in where your setup already is.

  1. Part 1 of 5 Start here

    Kubernetes Workloads and Controllers: Choosing and Reading Them

    Deployments, StatefulSets, DaemonSets, Jobs and CronJobs on a real three-node cluster: what kubectl reports, what happens when you delete a pod of each kind, why a DaemonSet skips the control plane, and which to use.

    Kubernetes intermediate 10 min read
  2. Part 2 of 5

    Kubernetes Health, Resources and Reliability

    What readiness, liveness and startup probes do (with a failing one of each), how requests decide scheduling and limits decide OOMKilled and throttling, what the cgroup counters show, and how termination grace works.

    Kubernetes intermediate 11 min read
  3. Part 3 of 5

    Debugging Kubernetes Workloads: A Repeatable Process on Real Failures

    A troubleshooting sequence (get, describe, logs, events, exec, port-forward) applied to four broken workloads: a crashing container, a missing image, a missing ConfigMap and an empty Service. Real events, real fixes.

    Kubernetes intermediate 10 min read
  4. Part 4 of 5

    Kubernetes Services, Networking and DNS: Following One Request

    How a request finds a pod: cluster DNS, the Service ClusterIP, the EndpointSlice the selector fills, port versus targetPort, headless Services and Ingress in outline; each inspected on a kind cluster, mistakes included.

    Kubernetes intermediate 9 min read
  5. Part 5 of 5

    Kubernetes Scaling, Rollouts and Recovery

    Manual scaling, rolling updates and rollback as an operator sees them, and a HorizontalPodAutoscaler on kind with metrics-server: real utilisation figures, a 2-to-6 scale-up under load, and the scale-down window.

    Kubernetes intermediate 11 min read

Practise

Labs that exercise this path

All labs →
Lab

Least-Privilege Kubernetes RBAC for a Deployer Service Account

Create a service account that can roll out Deployments in one namespace and nothing else, prove the boundary with impersonation and a real short-lived token, and audit the cluster for wildcard roles and anonymous access.

intermediate 35 minutes Kubernetes
Lab

Enforce Pod Security with Pod Security Admission and Kyverno

On a kind cluster, turn on the restricted Pod Security profile for a namespace, watch it reject a default pod, then add a Kyverno ValidatingPolicy in Audit mode, read the PolicyReport, and switch it to Deny.

intermediate 45 minutes Kubernetes · Kyverno

Toolchain

Tool profiles used in this path

All tools →
deploy Orchestration

Kubernetes

Container orchestration platform and the deployment target for most of the toolchain.

After the last part

Where to go next

One path picks up where this one stops. It is a suggestion, not a requirement.