Kubernetes tools hands-on
You have the right tool at hand for every typical question in day-to-day Kubernetes – and know when not to trust it.
- Free · no subscription
- 16 days · 60–90 min each
- 114 drills · with expected output
$ kubectl explain deployment.spec.strategy.rollingUpdate.maxSurge | head -12
Expected
GROUP: apps
KIND: Deployment
VERSION: v1
FIELD: maxSurge <IntOrString>
DESCRIPTION:
The maximum number of pods that can be scheduled above the desired number of
…
What you'll be able to do
- Query and change precisely with kubectl – JSONPath, jq, server-side apply, patches, impersonation – and switch between clusters safely
- Follow logs of many pods with stern, open shell-less containers with kubectl debug and narrow down network faults with netshoot, tcpdump and Hubble
- Check clusters, manifests, images and permissions with Popeye, Pluto, kubeconform, kube-linter, Polaris, Trivy, kube-bench, Kubescape and rbac-tool – and know where these tools get it wrong
- Preview Helm upgrades with helm-diff, drive Argo CD and Flux from the command line, build throwaway clusters with kind, k3d and ctlptl and write your own kubectl plugin in Go
What you need
LabOne VM with Ubuntu 24.04 and Docker – in the lab 4 vCPU, 8 GB RAM and about 30 GB of free disk, running a three-node kind cluster with Cilium
BrowserFor Headlamp, Hubble UI and Goldilocks – a browser on your machine that can reach the VM
Prior knowledgeThe book is for Kubernetes users and admins who know kubectl and want to work faster, safer and with the right tools. You should be comfortable with pods, deployments, services, RBAC and Helm; Go knowledge helps on Day 14 but is not required.
Set up your labKubernetes locally · Lab VMs
Training plan
One day = one sitting. Every day ends with a checkpoint and a challenge. About 23 hours in total.
Read first: Preface
Training days
- Day 0 The Training GroundBuild a kind cluster with three nodes and Cilium, and install the sample app “Werkzeugladen” (tool shop), on which you will try out every tool over the next days 60 min
- Day 1 kubectl for Advanced UsersAnswer questions to the cluster in a single line: look up fields with explain, build your own tables with custom-columns, filter precisely with JSONPath, jq and field selectors, and wait correctly with wait 75 min
- Day 2 Changes Without SurprisesSee changes beforehand and apply them deliberately: diff and --dry-run=server, Server-Side Apply with field managers, the three patch types, kustomize without an extra tool, checking permissions with auth can-i and --as 75 min
- Day 3 Many Clusters, Many NamespacesNever work in the wrong cluster again: understand the kubeconfig, switch quickly with kubectx and kubens, see the context in the prompt, open separate shells per cluster with kubie, and build your own kubeconfig for a ServiceAccount 60 min
- Day 4 Krew and PluginsExtend kubectl with plugins: set up Krew, answer seven everyday questions faster than with kubectl alone using tree, neat, view-secret, who-can, access-matrix, resource-capacity and images, and write your own plugin in three lines 75 min
- Day 5 k9sBrowse the cluster in the terminal instead of typing commands: views and command mode, filters, XRay, logs, port forwarding, custom plugins, hotkeys and aliases, read-only mode and export 75 min
- Day 6 Graphical User InterfacesRun Headlamp in the cluster and sign in with a read-only account, start Headlamp locally with a kubeconfig, choose the permissions behind a UI deliberately, and place Freelens as a desktop alternative 70 min
- Day 7 Logs and DebuggingFollow and filter the logs of many Pods at once, find the logs of crashed containers, examine containers without a shell with kubectl debug, and debug copies of Pods and nodes 80 min
- Day 8 Examining the NetworkCheck DNS, Services and ports with netshoot, capture traffic with tcpdump in an ephemeral container, use Hubble to see which connections a NetworkPolicy drops, and open a policy in a targeted way 80 min
- Day 9 Cluster HygieneScan a namespace with Popeye and read the report, find deprecated APIs in manifests with Pluto, compare utilization against requests with kube-capacity, and get recommendations for requests and limits from Goldilocks 80 min
- Day 10 Checking ManifestsCheck manifests before rolling them out: schema with kubeconform, best practices with kube-linter, kube-score and Polaris; read findings, switch them off selectively, and harden a manifest so that all four are satisfied 85 min
- Day 11 Checking SecurityCheck images and workloads for vulnerabilities and misconfigurations with Trivy, measure nodes against the CIS Benchmark with kube-bench, assess the namespace against a framework with Kubescape, examine permissions with rbac-tool, and actually close a gap you found 90 min
- Day 12 Helm and GitOps CLIsPreview Helm upgrades with helm-diff, install plugins under Helm 4 with a verified signature, check charts before use, and operate the command lines of Argo CD and Flux in a quick run-through: create, compare, synchronize, detect drift, suspend 85 min
- Day 13 Building and Throwing Away ClustersCreate additional throwaway clusters with kind and k3d, get ports and images into them, save logs, describe clusters including a registry declaratively with ctlptl, and judge when Tilt, Skaffold or talosctl fit 70 min
- Day 14 Your Own kubectl Plugins in GoWrite a kubectl plugin in Go that understands kubectl's flags, build it, call it through the plugin mechanism, test it with someone else's permissions, and install it locally as a Krew package 90 min
Finale
against the clock- Day 15 Competition – the Sabotaged ShopIn five rounds, find and fix hidden faults in the Werkzeugladen (tool shop), each with the tool that leads to the cause fastest: logs, network, hygiene, permissions, Helm. Against the clock, with a measurement as proof 90 min
- Appendix B Final ExamYou answer twenty questions and solve ten tasks across the whole book, incidents and assignments, each with the right tool and a proof, and grade yourself 120 min
Extras
optionalReady? Day 0 takes 60 min.
Reading works without an account. A free account saves your progress.
Related courses
More on this topic: Kubernetes courses