DevOps: Kubernetes basics
This course covers the core objects of Kubernetes and how a Rails application runs on them. It starts with the reconciliation loop, where controllers close the gap between desired and actual state. It also weighs the cost of adopting a cluster. Lessons then cover Pods and Deployments, rolling updates, Services, cluster DNS and Ingress, ConfigMaps and Secrets, probes, and resource requests and limits. Later lessons add migration Jobs, workers and autoscaling. It ends with a full manifest set and a release sequence.
What you'll learn
- ✓How the reconciliation loop and the control plane parts work together
- ✓Writing Deployments with matching labels, pinned image tags and rolling update settings
- ✓Exposing pods through Services, cluster DNS and Ingress
- ✓Delivering configuration with ConfigMaps and protecting Secrets
- ✓Setting probes, resource requests and limits, and reading pod failure states
- ✓Running Rails migrations as Jobs, workers as Deployments and autoscaling with an HPA
Why a cluster changes the question
Everything in this series so far has named machines. The Kamal configuration says hosts: [203.0.113.10], and you are the one who decided that this application runs on that server. When the server is full you add another line, and when the server is down you find out and act.
Read the full lesson free →Curriculum
7 lessonsWhy a cluster changes the question
How Kubernetes reconciles desired state, which parts form the control plane, and when a cluster is worth its cost.
Pods and Deployments
Pods as disposable units, Deployments and ReplicaSets, matching labels, pinned image tags, kubectl basics and rolling update settings.
Services and getting traffic in
Services as stable addresses selected by labels, the four Service types, cluster DNS, Ingress controllers and the Gateway API.
Configuration and secrets in a cluster
ConfigMaps as env vars or files, why Secrets are only base64-encoded, how to protect them, and restarting on change.
Health, resources, and scheduling
Liveness, readiness and startup probes, resource requests and limits, and how to read common pod failure states.
Running Rails on Kubernetes
Migrations as versioned Jobs, workers as a second Deployment, autoscaling with an HPA, and where to keep state.
Putting it together: a full manifest set
A complete manifest set for the application, the release sequence from CI, and what a production setup would add.