Kubernetes in Action, Second Edition
Marko Lukša
  • MEAP began February 2020
  • Publication in Spring 2021 (estimated)
  • ISBN 9781617297618
  • 775 pages (estimated)
  • printed in black & white
free previous edition eBook included
An eBook copy of the previous edition of this book is included at no additional cost. It will be automatically added to your Manning Bookshelf within 24 hours of purchase.
Kubernetes is an essential tool for anyone deploying and managing cloud-native applications. 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.
Table of Contents detailed table of contents


1 Introducing Kubernetes

1.1 Introducing Kubernetes

1.1.1 Kubernetes in a nutshell

1.1.2 About the Kubernetes project

1.2 Understanding Kubernetes

1.2.1 Understanding how Kubernetes transforms a computer cluster

1.2.2 The benefits of using Kubernetes

1.2.3 The architecture of a Kubernetes cluster

1.2.4 How Kubernetes runs an application

1.3 Introducing Kubernetes into your organization

1.3.1 Running Kubernetes on-premises and in the cloud

1.3.2 To manage or not to manage Kubernetes yourself

1.3.3 Using vanilla or extended Kubernetes

1.3.4 Should you even use Kubernetes?

1.4 Summary

2 Understanding containers

2.1 Introducing containers

2.1.1 Comparing containers to virtual machines

2.1.2 Introducing the Docker container platform

2.1.3 Introducing Docker alternatives and the Open Container Initiative

2.2 Exploring containers hands-on

2.2.1 Installing Docker and running a Hello World container

2.2.2 Creating a containerized Node.js web application

2.2.3 Creating a Dockerfile to build the container image

2.2.4 Building the container image

2.2.5 Running the container image

2.2.6 Distributing container images

2.2.7 Stopping and deleting containers

2.3 Understanding what makes containers possible

2.3.1 Using Namespaces to customize the environment of a process

2.3.2 Exploring the environment of a running container

2.3.3 Limiting a process’ resource usage with Linux Control Groups

2.3.4 Strengthening isolation between containers

2.4 Summary

3 Deploying your first application

3.1 Deploying a Kubernetes cluster

3.1.1 Using the built-in Kubernetes cluster in Docker Desktop

3.1.2 Running a local cluster using Minikube

3.1.3 Running a local cluster using kind (Kubernetes in Docker)

3.1.4 Creating a managed cluster with Google Kubernetes Engine

3.1.5 Creating a cluster using Amazon Elastic Kubernetes Service

3.1.6 Deploying a multi-node cluster from scratch

3.2 Interacting with Kubernetes

3.2.1 Setting up kubectl - the Kubernetes command-line client

3.2.2 Configuring kubectl to use a specific Kubernetes cluster

3.2.3 Using kubectl

3.2.4 Interacting with Kubernetes through web dashboards

3.3 Running your first application on Kubernetes

3.3.1 Deploying your application

3.3.2 Exposing your application to the world

3.3.3 Horizontally scaling the application

3.3.4 Understanding the deployed application

3.4 Summary


4 Introducing the Kubernetes API objects

4.1 Getting familiar with the Kubernetes API

4.1.1 Introducing the API

4.1.2 Understanding the structure of an object manifest

4.2 Examining an object’s individual properties

4.2.1 Exploring the full manifest of a Node object

4.2.2 Understanding individual object fields

4.2.3 Understanding an object’s status conditions

4.2.4 Inspecting objects using the kubectl describe command

4.3 Observing cluster events via Event objects

4.3.1 Introducing the Event object

4.3.2 Examining the YAML of the Event object

4.4 Summary

5 Running applications in Pods

5.1 Understanding pods

5.1.1 Understanding why we need pods

5.1.2 Organizing containers into pods

5.2 Creating pods from YAML or JSON files

5.2.1 Creating a YAML manifest for a pod

5.2.2 Creating the Pod object from the YAML file

5.2.3 Checking the newly created pod

5.3 Interacting with the application and the pod

5.3.1 Sending requests to the application in the pod

5.3.2 Viewing application logs

5.3.3 Copying files to and from containers

5.3.4 Executing commands in running containers

5.3.5 Attaching to a running container

5.4 Running multiple containers in a pod

5.4.1 Extending the kubia Node.js application using the Envoy proxy

5.4.2 Adding Envoy proxy to the pod

5.4.3 Interacting with the two-container pod

5.5 Running additional containers at pod startup

5.5.1 Introducing init containers

5.5.2 Adding init containers to a pod

5.5.3 Inspecting init containers

5.6 Deleting pods and other objects

5.6.1 Deleting a pod by name

5.6.2 Deleting objects defined in manifest files

5.6.3 Deleting all pods

5.6.4 Deleting objects of most kinds

5.7 Summary

6 Managing the lifecycle of the Pod’s containers

6.1 Understanding the pod’s status

6.1.1 Understanding the pod phase

6.1.2 Understanding pod conditions

6.1.3 Understanding the status of the containers

6.2 Keeping containers healthy

6.2.1 Understanding container auto-restart

6.2.2 Checking the container’s health using liveness probes

6.2.3 Creating an HTTP GET liveness probe

6.2.4 Observing the liveness probe in action

6.2.5 Using the exec and the tcpSocket liveness probe types

6.2.6 Using a startup probe when an application is slow to start

6.2.7 Creating effective liveness probe handlers

6.3 Executing actions at container start-up and shutdown

6.3.1 Using post-start hooks to perform actions when the container starts

6.3.2 Running a process just before the container terminates

6.4 Understanding the pod lifecycle

6.4.1 Understanding the initialization stage

6.4.2 Understanding the run stage

6.4.3 Understanding the termination stage

6.4.4 Visualizing the full lifecycle of the pod’s containers

6.5 Summary

7 Mounting storage volumes into the Pod’s containers

7.1 Introducing volumes

7.1.1 Understanding how volumes fit into pods

7.1.2 Introducing volume types

7.2 Using volumes

7.2.1 Using an emptyDir volume to persist files across container restarts

7.2.2 Using an emptyDir volume to share files between containers

7.2.3 Specifying how a volume is to be mounted in the container

7.3 Integrating external storage into pods

7.3.1 Using a Google Compute Engine Persistent Disk in a pod volume

7.3.2 Using other persistent volume types

7.3.3 Understanding how external volumes are mounted

7.4 Accessing files on the worker node’s filesystem

7.4.1 Introducing the hostPath volume

7.4.2 Using a hostPath volume

7.5 Summary

8 Configuring applications using ConfigMaps, Secrets, and the Downward API

9 Organizing API objects using labels, selectors, and Namespaces

10 Exposing Pods with Services and Ingresses

11 Deploying applications using Deployments

12 Persisting application data with PersistentVolumes

13 Deploying distributed applications using StatefulSets

14 Running special workloads using DaemonSets, Jobs, and CronJobs


15 Understanding the fine details of the Kubernetes API

16 Diving deep into the Control Plane

17 Diving deep into the Worker Nodes

18 Understanding the internal operation of Kubernetes controllers


19 Deploying highly-available clusters

20 Managing the computing resources available to Pods

21 Advanced scheduling using affinity and anti-affinity

22 Automatic scaling using the HorizontalPodAutoscaler

23 Securing the Kubernetes API using RBAC

24 Protecting cluster nodes with PodSecurityPolicies

25 Locking down network communication using NetworkPolicies

26 Upgrading, backing up, and restoring Kubernetes clusters

27 Adding centralized logging, metrics, alerting, and tracing


28 Best practices for Kubernetes application development and deployment

29 Extending Kubernetes with CustomResourceDefinitions and operators

What's inside

  • Up and running with Kubernetes
  • Deploying containers across a cluster
  • Securing clusters
  • Updating applications with zero downtime

About the reader

Written for intermediate software developers with little or no familiarity with Docker or container orchestration systems.

About the author

Marko Lukša is an engineer at Red Hat working on Kubernetes and OpenShift.

placing your order...

Don't refresh or navigate away from the page.
Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
print book $35.99 $59.99 pBook + eBook + liveBook
includes previous edition eBook
Additional shipping charges may apply
Kubernetes in Action, Second Edition (print book) added to cart
continue shopping
go to cart

eBook $38.39 $47.99 3 formats + liveBook
includes previous edition eBook
Kubernetes in Action, Second Edition (eBook) added to cart
continue shopping
go to cart

Prices displayed in rupees will be charged in USD when you check out.
customers also reading

This book 1-hop 2-hops 3-hops

FREE domestic shipping on three or more pBooks