← Kubernetes for Go developers

KUBERNETES TUTORIAL · KUBECTL SIMULATOR · 6 LESSONS

Operating, scaling and debugging

A triage method for broken pods, autoscaling under load, node failures and drains, kustomize and Helm, client-go controllers and a production checklist.

  1. Debug failing pods: get, describe, logs, exec and events in order

    Find out why a pod is not working by reading its STATUS, the Events in describe, the current and previous logs, the container from inside and the namespace events, and fix the most common failures.

    5 min · Worked lesson

  2. Autoscale pods on CPU with the HorizontalPodAutoscaler, VPA and cluster autoscaler

    Create an autoscaling/v2 HorizontalPodAutoscaler on CPU utilization, predict its replica count from the formula, tune how fast it scales up and down, and place the Vertical Pod Autoscaler and the cluster autoscaler next to it.

    6 min · Worked lesson

  3. When a node dies: NotReady, eviction, PodDisruptionBudgets and safe drains

    Explain the timeline from a lost node to rescheduled pods, protect planned maintenance with a PodDisruptionBudget, drain a node safely, and spread replicas so that one node or zone cannot take a service down.

    6 min · Worked lesson

  4. Package manifests per environment with Kustomize overlays, Helm charts and GitOps

    Build per-environment manifests from a shared base with Kustomize transformers and kubectl apply -k, explain Helm charts, values and releases, and choose between them and a GitOps controller.

    6 min · Worked lesson

  5. Talk to the Kubernetes API from Go with client-go, informers and workqueues

    Build a clientset from in-cluster or kubeconfig credentials, watch objects through a shared informer and lister, reconcile keys from a rate-limited workqueue, and shut a Go service down cleanly on SIGTERM.

    7 min · Worked lesson

  6. A production checklist for Deployments, applied to gopherforge/web:v2 in the lab

    Review a Deployment against a production checklist and write one that pins its image, sizes its resources, probes its health, survives disruptions, runs with least privilege and shuts down cleanly.

    6 min · Worked lesson