Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A practical, recipe-driven guide for developers and sysadmins who want to deploy, scale, and operate containerized applications on Kubernetes, covering everything from local development with Minikube to production-grade cluster management, security, and cloud-native tooling.
【Book Arc】
- **Opening (~0%–10%)**: Introduces Kubernetes as the standard for container orchestration, outlines prerequisites (Git, Go basics), and sets up the core tooling—installing `kubectl`, using Minikube for local clusters, and exploring the Kubernetes dashboard.
- **Early (~10%–23%)**: Moves from single-node local setups to creating real clusters, covering `kubeadm` for bootstrapping, tainting control-plane nodes for workloads, and downloading official Kubernetes releases and binaries from GitHub.
- **Early (~23%–32%)**: Focuses on mastering the Kubernetes client (`kubectl`)—resource aliases, autocompletion, deleting resources, using `kubectl explain` for schema discovery, and creating objects from YAML/JSON manifests via `kubectl apply`.
- **Middle (~32%–48%)**: Dives into core workload management: rolling back deployments with `kubectl rollout undo`, running batch jobs with Jobs, deploying per-node daemons with DaemonSets, and exposing services internally and externally, including ingress controllers.
- **Middle (~48%–52%)**: Extends into the broader ecosystem, showing how to use Helm for package management (searching Artifact Hub for charts) and preparing for more advanced topics like scaling, security, and the Kubernetes API.
【Key Takeaways】
- **Start local, think cluster** (Early): Minikube gives you a single-node cluster on your laptop with configurable CPU, memory, and node counts—ideal for testing before moving to production. Use `minikube start --nodes=2` to simulate multi-node behavior.
- **Master `kubectl` aliases and autocompletion** (Early): Remembering resource names like `po`, `svc`, `deploy`, and `ns` saves time, but enabling shell autocompletion (Recipe 12.1) is the real productivity booster.
- **`kubectl explain` is your schema dictionary** (Early): Unlike `kubectl describe` (which shows object values), `kubectl explain` pulls field definitions from the API server's OpenAPI spec—perfect for writing correct manifests without memorizing YAML structure.
- **Rollbacks are cheap and safe** (Middle): `kubectl rollout undo deployment myapp --to-revision 2` lets you revert to a known-good state. Note that only pod-template changes (env, ports, image) trigger a rollout; replica-count changes do not.
- **Jobs and DaemonSets solve different problems** (Middle): Use Jobs for batch processes that run to completion (backups, migrations), and DaemonSets for infrastructure daemons (like Fluentd) that must run on every node.
- **Services are label-driven abstractions** (Middle): A Service's selector determines which pods receive traffic. If a service isn't working, check the selector and verify endpoints with `kubectl get endpoints <service-name>`.
- **Ingress controllers are required for external routing** (Middle): Creating an Ingress resource alone isn't enough—you must deploy an ingress controller (e.g., ingress-nginx) to watch the API server and configure routes.
- **Helm integrates with Artifact Hub** (Middle): `helm search hub redis` lets you discover and evaluate community charts directly from the CLI, making package management for Kubernetes much easier.
【Reading Tips】
- **Skim Chapter 1–2** if you already have a cluster; focus on the Minikube flags and `kubeadm` taint commands, which are the most reusable bits.
- **Deep-read Chapter 3–4** for `kubectl` mastery—the `explain` vs. `describe` distinction and the rollout trigger rules are subtle but critical.
- **Pay attention to the "Discussion" sections** after each recipe; they explain *why* a solution works, not just *how*—this is where the real learning happens.
- **Use the "See Also" references** to jump between related recipes (e.g., labels in Chapter 7, quotas in Chapter 7.4) when you need to combine concepts.
- **Keep a terminal handy** and run the commands as you read; the cookbook format assumes hands-on practice, not passive reading.
【Coverage Limits】
This guide covers the first half of the book (roughly up to 52%), focusing on setup, core workloads, services, and Helm. Later chapters on scaling (Chapter 9), security (Chapter 10), the Kubernetes API (Chapter 7), and advanced topics like cluster resizing are not covered in this sample.
Excerpt 1
88 7.5 Labeling an Object 89 7.6 Using Labels for Queries...
imum version of Kubernetes that they can run on. Figure 1-1. Snapshot of the Docker Desktop Kubernetes settings panel It is worth noting that the version of ...
the Swagger/OpenAPI definitions, exposed by the API server. You can think of kubectl explain as a way to describe the structure of Kubernetes resources, wher...
that make up this microservice abstraction. Kubernetes uses the Service object to dynamically configure the iptables on all the nodes to be able to send the ...
object’s metadata. Any object in Kubernetes can be labeled. Labels are also used by Kubernetes itself for pod selection by deployments (see Recipe 4.1) and s...
e worker node and make sure you can access it with kubectl: $ eksctl create cluster --name supersizeme \ --region eu-central-1 --instance-types t3.small ...
ard deployment generated with kubectl run (see Recipe 4.5): $ kubectl create deployment nginx --image nginx:1.25.2 --replicas 4 When you list the pods and sh...
t kubectl drain $NODE --force will also evict pods not man‐ aged by a ReplicationController, ReplicaSet, Job, DaemonSet, or StatefulSet. See Also • “Safely D...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Loading comments...
Reply to Comment
Edit Comment