DEV Community

Alain Airom
Alain Airom

Posted on

Kuberntes in Action 2nd Edition — Book Review

Feedback on one my latest readings: “Kubernetes in Action, 2nd Edition”.

🚀 Zero to Cluster-Ready: Why I Just “Ate” 800 Pages of YAML Wisdom

When I received the notification of the MEAP update (aka the book-in-progress edition) for Kubernetes in Action, Second Edition, I devoured it in literally 4 days. I know what you’re thinking — “Who reads a technical manual like a thriller novel?” Well, for me, this was the equivalent of a digital feast, and I had three very hungry reasons to dive in:

  • A Proven Pedigree: I read the 1st edition years ago, and it was truly great — the gold standard for anyone trying to wrap their head around container orchestration.
  • The Wait is Over: This edition has been in the works for a while, and this major upgrade — with almost all chapters finally available — is a massive milestone. It’s the comprehensive update the community has been waiting for.
  • The K8s Obsession: Ever since I got “heavily” involved in Kubernetes technology several years ago, I’ve become a bit of a resource hunter. I’m always avid for great material that cuts through the noise, and Marko Lukša and Kevin Conner deliver exactly that.

Whether you’re still trying to figure out what a Pod actually is or you’re deep in the trenches of the new Gateway API, this update is a game-changer. Here is why this “devour-worthy” edition deserves a spot on your (digital) shelf…

Before we dive into my takesal details, a quick word of transparency: I have absolutely no affiliation with the publisher, Manning, nor with the book’s authors. I’m sharing this purely as a fellow practitioner and a fan of high-quality technical literature — this review is fueled entirely by my own enthusiasm for the craft and a genuine appreciation for a well-written guide!

Introduction


Kubernetes in Action, Second Edition is a comprehensive, practical and an an authoritative guide to mastering the Kubernetes platform, authored by Marko Lukša and Kevin Conner. This second edition builds upon the success of the first by adding more detailed information and refining the learning path to accommodate the evolving Kubernetes ecosystem. It treats Kubernetes not just as a tool, but as a transformative operating system for the data center. This edition is significantly expanded from its 600-page predecessor to include modern networking standards and production-grade best practices.


🛠️ Practical Application: The “Kiada” Suite

Throughout the text, readers build the Kiada suite, a microservice application that serves as a practical laboratory for testing these concepts. By following this project, readers move from basic pod deployment to managing a multi-service architecture with integrated load balancing, persistent storage, and automated updates through Deployments.


🌟 Key Highlights and Themes

  • Hands-On Learning Experience: The book is intentionally designed to move beyond theory, taking readers through a step-by-step journey of building and deploying a microservice application called “Kiada”.
  • Infrastructure Abstraction: A core theme is how Kubernetes acts as a “helmsman,” abstracting away underlying hardware and automating the deployment, scaling, and management of containerized applications.
  • Declarative Model: The authors emphasize the power of the declarative model, where users describe the desired state of an application, and Kubernetes works autonomously to maintain that state.
  • Production Readiness: While beginner-friendly, the book provides a solid foundation for managing Kubernetes in production, covering essential topics like configuration, storage, and networking.

The book’s central philosophy is the Declarative Model: users provide a description of the desired application design, and Kubernetes’ autonomous controllers perform the necessary actions to reconcile the current state with that design.


🏗️ Book Structure

The book is organized into five logical parts designed to build a deep understanding of the platform:


| Part       | Focus Area                  | Key Topics Covered                                           |
| ---------- | --------------------------- | ------------------------------------------------------------ |
| **Part 1** | **Getting Started**         | Introduction to Kubernetes origins, containers, and deploying your first application . |
| **Part 2** | **Running Applications**    | Deep dive into Pods, lifecycles, container health, and organizing resources with namespaces and labels . |
| **Part 3** | **Configuration & Storage** | Managing application state using ConfigMaps, Secrets, and Persistent Volumes . |
| **Part 4** | **Connectivity**            | Exposing applications via Services, Ingress, and the modern Gateway API . |
| **Part 5** | **Controllers & Scaling**   | Using ReplicaSets, Deployments, StatefulSets, DaemonSets, and Jobs to automate management . |
Enter fullscreen mode Exit fullscreen mode

Deep-dives

🏯️ Architecture and Core Abstractions

The authors illustrate Kubernetes as a “helmsman” that abstracts underlying hardware (computers, networks, and storage) into a unified pool of resources.

  • Pods: Detailed as the fundamental unit of deployment. The book explores advanced pod concepts, including init containers for setup tasks and sidecar containers to extend functionality without modifying the main application code.

Image from the title

Image from the title

  • Nodes: While pods run on worker nodes, the book emphasizes that in a mature Kubernetes environment, the specific host node should be “invisible” to the developer, as Kubernetes handles scheduling based on resource requirements.
  • The Reconciliation Loop: A critical technical concept explained is how controllers (like the ReplicaSet controller) constantly monitor the cluster, comparing the “observed state” to the “desired state” and making incremental changes to achieve parity.

🌐 Advanced Networking and Traffic Management

A significant portion of the second edition is dedicated to the evolution of Kubernetes networking, moving from basic connectivity to sophisticated traffic routing.

  • Services: Beyond simple load balancing, the book explains Headless Services, which allow for direct peer discovery through DNS — a requirement for distributed systems like MongoDB where members must find one another’s individual IPs.
kind: HTTPRoute
metadata:
name: my-inter-service-route
spec:
parentRefs:
- name: destination-service
kind: Service
group: core
port: 80
rules:
- ...
Enter fullscreen mode Exit fullscreen mode
  • Ingress vs. Gateway API: The text provides an in-depth transition from the legacy Ingress API (Layer 7 routing) to the modern Gateway API. It details how the Gateway API provides a more expressive, role-oriented, and standardized way to manage “North-South” (external to cluster) traffic (this subject required really mon attention).

Ingress Limitations: The Ingress API often relies on non-standardized “annotations” to handle advanced features like URL rewriting or session affinity, leading to fragmentation between different ingress controller implementations.
The Gateway Solution: The Gateway API is designed to be more “expressive” and “role-oriented,” allowing different teams (e.g., infrastructure vs. application developers) to manage their respective parts of the network configuration independently.

| Component        | Responsibility                                               | Analogous to...    |
| ---------------- | ------------------------------------------------------------ | ------------------ |
| **GatewayClass** | Defines the "type" of load balancer (e.g., an Nginx-based balancer vs. a cloud provider's native balancer). Managed by Infrastructure Admins. | StorageClass       |
| **Gateway**      | Represents the actual instantiation of the load balancer. It defines where the traffic is received (e.g., IP addresses and ports 80/443). | The Physical Proxy |
| **HTTPRoute**    | Defines the routing rules (paths, headers, and destination services). Managed by Application Developers. | Ingress Rules      |
Enter fullscreen mode Exit fullscreen mode
  • Service Mesh (GAMMA): The authors introduce the Service Mesh Interface (SMI) and the GAMMA initiative, explaining how the Gateway API is being extended to manage “East-West” (interservice) communication within the cluster.

💾 State and Storage Management

The book provides a rigorous look at how to handle data in an ephemeral container environment.

  • Configuration: Deep dives into ConfigMaps and Secrets, including how to inject these into containers via environment variables or volume mounts.
  • Persistence: It contrasts simple volumes with PersistentVolumes (PV) and PersistentVolumeClaims (PVC), which decouple storage from the pod lifecycle.

Image from the title

Image from the title

  • StatefulSets: For complex stateful applications (like databases), the book explains how StatefulSets provide stable network identities and persistent storage that “sticks” to a specific pod instance even across restarts.

⚙️ Operational Workloads and Controllers

The synthesis of different controller types highlights the platform’s versatility:

  • DaemonSets: Used for node-level agents (like log collectors or monitoring tools) that must run exactly one instance on every node in the cluster. The book explains how they use taints and tolerations to ensure they can run even on restricted nodes.
  • Jobs and CronJobs: Focuses on batch processing and time-based tasks, explaining how Kubernetes manages the lifecycle of pods that are meant to exit upon completion rather than run indefinitely.

Image from the title

Image from the title

  • Self-Healing: A core theme is Kubernetes’ ability to automatically restart failed containers and reschedule pods if a node suffers a hardware failure.

Code And Examples

Regarding the code and examples… well, what would a technical book be without them? :)! As I mentioned earlier, the book doesn’t just throw snippets at you; its official GitHub repository takes you on a journey through the “Kiada Suite” microservices app. It’s a brilliant hands-on approach where, chapter by chapter, the application evolves — getting more robust and feature-complete to perfectly mirror the book’s structure. Watching the project grow from a single container into a fully orchestrated system is incredibly satisfying and makes the complex concepts stick!

package main

import (
 "fmt"
 "log"
 "net/http"
 "os"

 "github.com/gorilla/handlers"
 "github.com/gorilla/mux"
)

type HTTPServer struct {
 nodeInfo NodeInfo
}

func NewHTTPServer(nodeInfo NodeInfo) HTTPServer {
 return HTTPServer{nodeInfo: nodeInfo}
}

func (s *HTTPServer) handleRoot(res http.ResponseWriter, req *http.Request) {
 nodeName := os.Getenv("NODE_NAME")
 if nodeName == "" {
  // fallback to hostname when NODE_NAME env var isn't set
  var err error
  nodeName, err = os.Hostname()
  if err != nil {
   s.handleInternalError(res, err)
  }
 }

 uptime, err := s.nodeInfo.Uptime()
 if err != nil {
  log.Print(err)
 }
 loadAverage, err := s.nodeInfo.LoadAverage()
 if err != nil {
  log.Print(err)
 }

 res.WriteHeader(http.StatusOK)
 _, err = res.Write([]byte(fmt.Sprintf("%s uptime: %s, load average: %s", nodeName, uptime, loadAverage)))
 if err != nil {
  s.handleInternalError(res, err)
 }
}

func (s *HTTPServer) handleInternalError(res http.ResponseWriter, err error) {
 log.Printf("INTERNAL ERROR: %v", err)
 s.errorResponse(res, http.StatusInternalServerError, err)
}

func (s *HTTPServer) errorResponse(res http.ResponseWriter, statusCode int, err error) {
 res.WriteHeader(statusCode)
 _, _ = fmt.Fprintf(res, "ERROR: %v\n", err.Error())
}

func (s *HTTPServer) ListenAndServe(listenAddress string) {
 router := mux.NewRouter()
 router.Methods("GET").Path("/").HandlerFunc(s.handleRoot)

 allowedHeaders := handlers.AllowedHeaders([]string{"X-Requested-With", "Content-Type"})

 http.Handle("/", handlers.CORS(allowedHeaders)(router))
 err := http.ListenAndServe(listenAddress, nil)
 if err != nil {
  panic(err)
 }
}
Enter fullscreen mode Exit fullscreen mode
apiVersion: batch/v1
kind: Job
metadata:
  name: demo-good-sidecar
spec:
  completions: 1
  template:
    spec:
      restartPolicy: OnFailure
      initContainers:
      - name: sidecar
        restartPolicy: Always
        image: busybox
        command:
        - sh
        - -c
        - "while true; do echo 'Sidecar still running...'; sleep 5; done"
      containers:
      - name: demo
        image: busybox
        command: ["sleep", "20"]
Enter fullscreen mode Exit fullscreen mode

✅ Why This Book is Fit and a Good Read for Kubernetes Enthusiasts (in my opinion)

  • No Prior Experience Needed: It is accessible to those without prior knowledge of Docker, Linux, or containers, providing all necessary background as you progress.
  • Modern Standards: It covers up-to-date technologies like the Gateway API for traffic routing and Service Mesh concepts (GAMMA initiative), ensuring readers learn current best practices.
  • Clarity through Analogy: The book uses effective analogies — such as comparing Kubernetes to a ship’s helmsman — to make complex orchestration concepts intuitive.
  • Detailed & Comprehensive: With over 600 pages of content in its previous version and even more in this edition, it serves as both a tutorial and a long-term reference for developers and cluster administrators.

Conclusion

In conclusion, the book is far more than just a technical manual; it is a comprehensive roadmap for navigating the complexities of modern cloud-native infrastructure. By balancing a deep dive into internal architectures with the practical, hands-on evolution of the “Kiada Suite,” the authors have managed to demystify even the most intimidating aspects of the platform.

From the foundational logic of Pods and Controllers to the cutting-edge implementation of the Gateway API and Service Mesh integration, the book provides the rare clarity needed to move from “running a cluster” to truly “mastering the ecosystem.”

For all these reasons — the proven pedigree of the first edition, the massive and timely scope of this upgrade, and its unique ability to serve both the curious beginner and the seasoned expert — in my opinion this is a book absolutely worth reading. If you are serious about Kubernetes, this is the resource that will turn your “YAML-induced headaches” into a streamlined, high-availability reality.

>>> Thanks for reading <<<

Links

Top comments (0)