Cheat sheet · Specialise
Kubernetes cheat sheet
Opens with creditsA working reference for running applications on Kubernetes: how the cluster works, the objects you write in YAML, and the kubectl commands you reach for daily. Use it to recall a field, pick the right workload type or work out why a Pod will not start.
Chapters
10 chapters · 73 concepts
1How a cluster worksThe control plane decides, the nodes run. Every Kubernetes behaviour comes from controllers comparing what you asked for with what exists.7 concepts
- 1Desired state and reconciliationYou declare objects (a Deployment with three replicas) and controllers loop forever, comparing the declared spec with the observed status and acting to close…
- 2API serverThe front door of the cluster. kubectl, controllers, kubelets and CI all read and write objects through its REST API, which authenticates, authorises and…
- 3etcdA consistent, distributed key-value store holding every object in the cluster.
- 4Scheduler and controller managerThe scheduler assigns each new Pod to a node that fits its resource requests and constraints.
- 5kubeletThe agent on every node.
- 6Container runtime, kube-proxy and CNIThe runtime (usually containerd, through the CRI) runs containers.
- 7Managed clustersCloud services run and upgrade the control plane for you; you manage node pools (or let the provider manage them too) and your workloads. kind, k3d and minikube…
7 in this chapterOpen this chapter2kubectl essentialsThe command line you use to read, change and inspect everything in the cluster.7 concepts
- 1kubeconfig and contextskubeconfig (
~/.kube/configor$KUBECONFIG) lists clusters, users and contexts. - 2get and describe
kubectl getlists objects in a table, or full YAML with-o yaml. - 3apply, diff and dry runs
kubectl apply -fcreates or updates objects to match files. - 4Labels and selectorsLabels are key and value pairs on objects, like
app: api. - 5Output formats and jsonpath
-o yamland-o jsonprint full objects,-o wideadds columns, and-o jsonpathorcustom-columnsextract exactly the fields you want. - 6kubectl explainPrints the schema and documentation for any field of any resource, straight from the cluster's API.
- 7Manifest anatomyEvery object has
apiVersion,kind,metadata(name, namespace, labels, annotations) and usuallyspec(what you want).
7 in this chapterOpen this chapter- 1kubeconfig and contextskubeconfig (
- Pods and workload controllersThe Pod is the unit that runs. Controllers create and replace Pods for you, each suited to a different kind of work.7 conceptsOpens with credits
- Probes, rollouts and rollbacksHow Kubernetes knows a Pod is healthy, and how it swaps versions without dropping traffic.8 conceptsOpens with credits
- Services, Ingress and Gateway APIGiving changing Pods a stable address, and letting traffic in from outside the cluster.7 conceptsOpens with credits
- Configuration, resources and scalingFeeding settings and secrets to Pods, sizing them honestly, and letting the cluster add or remove capacity.8 conceptsOpens with credits
- Storage and stateful appsHow Pods get disks that outlive them, and how StatefulSets give databases stable identities.7 conceptsOpens with credits
- Namespaces, RBAC and Pod securityDividing a cluster between teams and apps, and giving each person and workload only the access it needs.7 conceptsOpens with credits
- Packaging with HelmHelm packages Kubernetes manifests as versioned, configurable charts and tracks every install as a release.8 conceptsOpens with credits
- Debugging workloadsReading Pod states, events and logs, and getting a shell or a network view where you need one.7 conceptsOpens with credits
- 11Glossary, A to ZEvery concept in the sheet and the smaller terms it uses, in one list.99 terms
About this sheet
Clusters, kubectl, workloads, Services, Gateway API, config, probes, scaling, storage, RBAC, Helm and debugging.
Related on Sefism
Picked from the other libraries by shared topics.
Roadmaps
See allBest practices
See all- Kubernetes Best PracticesRun workloads on Kubernetes that schedule well, survive restarts and node drains, and stay locked down: resources, probes, PDBs, Pod Security and RBAC.
- Terraform Best PracticesWrite Terraform that teams can review and change safely: file layout, version pinning, remote state with locking, secrets, modules, refactoring and tests.
- CI/CD Best PracticesBuild pipelines that are fast, trustworthy and safe to deploy from: trunk-based flow, fast tests, locked-down workflows, signed artifacts, canaries and DORA metrics.
Checklists
See all- Incident Response ChecklistPrepare for and handle production incidents: on-call, severity levels, declaring, roles, mitigation, security containment, status updates and blameless postmortems.
- Production Readiness ChecklistCheck a service before it takes real traffic: ownership, SLOs, capacity, timeouts and retries, alerts, rollout and rollback, backups, security and on-call.
- Kubernetes Production ChecklistVerify a workload and its cluster before real traffic: requests and limits, probes, PDBs, spread, Pod Security, RBAC, network policies, secrets, images, autoscaling, upgrades and backups.
Project structures
See all- Terraform project structureAn infrastructure repository for a small app on AWS: reusable modules, one folder per environment with its own remote state, pinned providers, tests and security scans, with plan on every pull request and apply from CI. For students who have finished the Terraform tutorials and want to know how a real team lays out the files. The same layout works unchanged with OpenTofu.
- Kubernetes with Helm project structureA Helm chart repository for one app: the chart that
helm creategives you, grown into a tested, versioned package with per-environment values, unit tests, install tests in a kind cluster and releases to an OCI registry. For students who can write a Deployment by hand and want to know how a team organises charts. It is about the repo layout and what each file does, not about cluster design. - Spring Boot project structureA REST API in Java with Spring Boot 4, PostgreSQL, Flyway and Testcontainers, organised by feature the way the Spring docs suggest. It grows from the Initializr scaffold to a service with JWT security, problem-detail errors, MapStruct DTOs, slice and integration tests, CI, containers and observability, and finally Modulith boundaries, contract and load tests. For students who know some Java and want to see how a real service is organised.
Career questions
See all- Do I need Docker and Kubernetes as a junior developer?Docker, yes: learn the basics, because nearly every team uses containers and you will be expected to run the project locally and read a Dockerfile. Kubernetes, mostly no: understand what it does and a few core terms, but deep Kubernetes can wait until your job or a DevOps direction needs it.
- What is platform engineering, and how is it different from DevOps?DevOps is a culture and set of practices: developers and operations sharing responsibility for shipping and running software. Platform engineering is one way to put that into practice at scale: a team builds an internal platform, a paved road of tools and templates, so product teams can ship without becoming infrastructure experts.
- Can I become an SRE or platform engineer straight after graduating?Sometimes, but it is rare, because these roles expect you to have run production systems. The more reliable path is a first job in backend, DevOps or cloud support, where you learn production, then a move into SRE or platform work within a couple of years.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
- 1:1 Mentorship
- Fresh Graduate Mentorship
- Career Guidance
Brand deals, promos and partnerships: tauseeffayyaz@gmail.com