Share E-Book
Scan to open this page

Scan with your phone to open this page

Author: Marko Lukša, Kevin Conner

Rating No ratings yet

Kubernetes in Action, Second Edition is a fully-updated and comprehensive guide to developing and running applications in a Kubernetes environment. It lays out a complete introduction to container technologies and containerized applications along with practical tips for efficient deployment and operation. This revised edition of the bestselling original contains new coverage of the Kubernetes architecture, including the Kubernetes API, and a deep dive into managing a Kubernetes cluster in production. About the technology Kubernetes is Greek for “helmsman,” your guide through unknown waters. The Kubernetes container orchestration system safely manages the structure and flow of a distributed application, organizing containers and services for maximum efficiency. Kubernetes serves as an operating system for your clusters, reducing the need to factor the underlying network and server infrastructure into your designs. As more and more applications are created using cloud-native and container-based architectures, Kubernetes has become an essential tool for modern developers to master. About the book Kubernetes in Action, Second Edition teaches you to use Kubernetes to deploy container-based distributed applications. You'll start with an overview of how Docker containers work with Kubernetes and move quickly to building your first cluster. You'll gradually expand your initial application, adding features and deepening your knowledge of Kubernetes architecture and operation. In this revised and expanded second edition, you’ll take a deep dive into the structure of a Kubernetes-based application and discover how to manage a Kubernetes cluster in production. As you navigate this comprehensive guide, you'll also appreciate thorough coverage of high-value topics like monitoring, tuning, and scaling. What's inside - Up and running with Kubernetes - Deploying containers across a cluster - Securing clusters - Updating applications with zero downtime

AI Reading Assistant

Whole-book reading guide from stratified index samples; jump to passages in the text

AI guide
# Kubernetes in Action, Second Edition — Reading Guide ## 【One-Line Pitch】 A hands-on, developer-focused guide to containerizing applications and running them on Kubernetes, walking you from your first Docker image to production-grade deployments with zero-downtime updates. Ideal for application developers and system administrators who want practical, progressive mastery of Kubernetes without getting lost in cluster-operations theory. ## 【Book Arc】 - **Opening (~0%–9%)**: Introduces the declarative model — you describe your application's desired state, and Kubernetes continuously reconciles the running system to match. Establishes the core mental model that everything else builds on. - **Early (~9%–25%)**: Covers container fundamentals with Docker/Podman — images, registries, containers, resource limits via cgroups, and building your first application image. Solves the "how do I package my app" problem before touching Kubernetes. - **Early (~25%–34%)**: Gets you running your first cluster with kind or Minikube, deploying a simple app, and understanding the basic object types (Pods, Deployments, Services, Nodes). Establishes the kubectl workflow you'll use throughout. - **Middle (~34%–44%)**: Deepens your understanding of the Kubernetes API — how to inspect object schemas with `kubectl explain`, and how to work with Pods in detail, including communication, logging, and port-forwarding for development. - **Middle (~44%–47%)**: Explores multi-container Pod patterns — adding sidecar containers (like Envoy) to extend application functionality without modifying application code, plus init containers for pod startup sequencing. ## 【Key Takeaways】 - **Kubernetes is declarative, not imperative** (Opening): You describe the desired end state, and Kubernetes handles the "how" — restarting failed components, recreating disappeared ones, and reconfiguring when you change the description. This is the single most important concept to internalize. - **Containers share the kernel, not the hardware** (Early): Unlike VMs, containers share the host kernel and memory space, which means resource limits matter — Docker's `--cpus`, `--memory`, and related flags configure cgroups that the kernel enforces. Understanding this prevents "noisy neighbor" problems. - **Images are the unit of distribution** (Early): A container image packages your app plus its environment (libraries, files, binaries) into a portable artifact that can be pushed to and pulled from registries. Choosing the right base image (e.g., `node` for Node.js apps) saves significant effort. - **Pods, not containers, are the basic unit** (Early): A Pod can hold one or more related containers that share network and UTS namespaces, and each Pod gets its own IP address. Deployments manage Pod replicas, while Services provide stable, load-balanced access to them. - **kubectl is your primary interface** (Early): The CLI tool handles everything from creating deployments to scaling replicas (`kubectl scale`), and you can inspect any object with `kubectl get` and `kubectl describe`. Setting up an alias and shell completion pays off immediately. - **The API is self-documenting** (Middle): `kubectl explain` lets you drill into any object's schema — top-level fields like `spec` and `status`, then subfields — directly from the command line. This turns the API into a learning tool, not just an interface. - **Sidecar containers extend apps without code changes** (Middle): Adding a proxy like Envoy alongside your main container lets you bolt on TLS, observability, or other features without touching application code — a powerful pattern for evolving applications in place. ## 【Reading Tips】 - **Skim the container basics if you're already Docker-proficient** (Early): The Dockerfile walkthrough and image-building details are valuable for beginners, but experienced readers can jump to the kind cluster setup around the 25% mark. - **Deep-read the Pod chapter** (Middle): Multi-container Pod patterns, sidecar containers, and init containers are where Kubernetes diverges from plain Docker — this is where the real architectural value lives. - **Follow along with the Kiada demo application**: The book uses a single example app throughout, so actually building and deploying it as you read will cement the concepts far better than passive reading. - **Use `kubectl explain` as you read**: When the book discusses an object type, run the command yourself and explore the schema — it reinforces the API structure and builds muscle memory. - **Don't get bogged down in cluster operations**: The book explicitly focuses on the development side; if you're not planning to operate production clusters, skim the cluster-installation options and focus on application deployment patterns. ## 【Coverage Limits】 This guide covers the book's progression through container basics, first cluster setup, Pod fundamentals, and multi-container patterns. The excerpts do not cover later chapters on Services deep-dives, volumes, ConfigMaps/Secrets, Deployments and rolling updates, or production cluster management — those topics are beyond this sample's scope. ##
Excerpt 1
of high-value topics like monitoring, tuning, and scaling. What's inside - Up and running with Kubernetes - Deploying containers across a cluster - Securing...
View in text
Excerpt 2
ss Image registry Container image Running containerFigure 2.4 The three main Docker concepts are images, registries, and containers. Licensed to THIAGO BANDE...
View in text
Excerpt 3
10.1.0.2 IP: 10.1.1.1 Worker node 1 Worker node 2 Figure 3.8 The relationship between containers, pods, and worker nodes As illustrated in the figure, each p...
View in text
Excerpt 4
sier option where you don’t need to touch the code at all. You can run a reverse proxy alongside the Node.js application in a sidecar con- tainer, as explain...
View in text
Excerpt 5
rted: Post-start hooks—Executed when the container starts Pre-stop hooks—Executed shortly before the container stops These lifecycle hooks are specified per...
View in text
Excerpt 6
ctor is applied. The operator must be one of the following: In—The label value must match one of the values in the values field. NotIn—The label value must n...
View in text
Excerpt 7
hese volumes in different locations, as shown in figure 9.6. The reason why you might want to mount multiple volumes in one container is that these volumes m...
View in text
Excerpt 8
pods. Alternatively, you can configure this setting in the ServiceAccount itself. 9.6 Other volume types at a glance If you run the kubectl explain pod.spec....
View in text
Tags
AI categories
Cloud NativeBackendProgramming Language
ISBN: 1617297615
Publish Year: 2026
Language: English
Pages: 690
File Format: PDF
File Size: 13.2 MB
Text Preview (First 20 pages)
Registered users can read the full content for free

Register as a Gaohf Library member to read the complete e-book online for free and enjoy a better reading experience.

Generating text preview…