Book description
Go beyond the basics of Kubernetes and explore more advanced concepts, including Kubernetes in production, governance, serverless computing, and service meshes. Purchase of the print or Kindle book includes a free eBook in PDF format.
Key Features
- Master Kubernetes architecture and design to build, deploy, and secure large-scale distributed systems
- Learn advanced concepts like autoscaling, multi-cluster management, serverless computing, service meshes and policy engines
- Explore Kubernetes 1.25 and its rich ecosystem of tools like Kubectl, Krew, K9s, Lens, and Helm
Book Description
The fourth edition of the bestseller Mastering Kubernetes includes the most recent tools and code to enable you to learn the latest features of Kubernetes 1.25. This book contains a thorough exploration of complex concepts and best practices to help you master the skills of designing and deploying large-scale distributed systems on Kubernetes clusters.
You’ll learn how to run complex stateless and stateful microservices on Kubernetes, including advanced features such as horizontal pod autoscaling, rolling updates, resource quotas, and persistent storage backends. In addition, you’ll understand how to utilize serverless computing and service meshes.
Further, two new chapters have been added. “Governing Kubernetes” covers the problem of policy management, how admission control addresses it, and how policy engines provide a powerful governance solution. “Running Kubernetes in Production” shows you what it takes to run Kubernetes at scale across multiple cloud providers, multiple geographical regions, and multiple clusters, and it also explains how to handle topics such as upgrades, capacity planning, dealing with cloud provider limits/quotas, and cost management.
By the end of this Kubernetes book, you’ll have a strong understanding of, and hands-on experience with, a wide range of Kubernetes capabilities.
What you will learn
- Learn how to govern Kubernetes using policy engines
- Learn what it takes to run Kubernetes in production and at scale
- Build and run stateful applications and complex microservices
- Master Kubernetes networking with services, Ingress objects, load balancers, and service meshes
- Achieve high availability for your Kubernetes clusters
- Improve Kubernetes observability with tools such as Prometheus, Grafana, and Jaeger
- Extend Kubernetes with the Kubernetes API, plugins, and webhooks
Who this book is for
If you're a system administrator or cloud developer who wants to become comfortable with Kubernetes and would like to master its advanced features, then this book is for you. Software and DevOps engineers with a working knowledge of Kubernetes, as well as technical managers of Kubernetes-based systems, will also find this book useful. Those deciding on whether to migrate to Kubernetes and are curious about its inner workings will find plenty of answers here as well. Basic familiarity with networking concepts will prove beneficial.
Table of contents
- Preface
- Understanding Kubernetes Architecture
-
Creating Kubernetes Clusters
- Getting ready for your first cluster
- Creating a single-node cluster with Minikube
- Creating a multi-node cluster with KinD
- Creating a multi-node cluster with k3d
- Comparing Minikube, KinD, and k3d
- Creating clusters in the cloud (GCP, AWS, Azure, and Digital Ocean)
-
Creating a bare-metal cluster from scratch
- Use cases for bare metal
- When should you consider creating a bare-metal cluster?
- Understanding the process
- Using the Cluster API for managing bare-metal clusters
- Using virtual private cloud infrastructure
- Building your own cluster with Kubespray
- Building your cluster with Rancher RKE
- Running managed Kubernetes on bare metal or VMs
- Summary
-
High Availability and Reliability
- High availability concepts
- High availability best practices
- High availability, scalability, and capacity planning
- Large cluster performance, cost, and design trade-offs
- Choosing and managing the cluster capacity
- Pushing the envelope with Kubernetes
- Testing Kubernetes at scale
- Summary
-
Securing Kubernetes
- Understanding Kubernetes security challenges
- Hardening Kubernetes
- Running a multi-tenant cluster
- Summary
-
Using Kubernetes Resources in Practice
- Designing the Hue platform
- Using Kubernetes to build the Hue platform
- Separating internal and external services
- Advanced scheduling
- Using namespaces to limit access
- Using Kustomization for hierarchical cluster structures
- Launching jobs
-
Mixing non-cluster components
- Outside-the-cluster-network components
- Inside-the-cluster-network components
- Managing the Hue platform with Kubernetes
- Using liveness probes to ensure your containers are alive
- Using readiness probes to manage dependencies
- Using startup probes
- Employing init containers for orderly pod bring-up
- Pod readiness and readiness gates
- Sharing with DaemonSet pods
- Evolving the Hue platform with Kubernetes
- Summary
-
Managing Storage
- Persistent volumes walk-through
- Demonstrating persistent volume storage end to end
- Public cloud storage volume types – GCE, AWS, and Azure
- GlusterFS and Ceph volumes in Kubernetes
- Integrating enterprise storage into Kubernetes
- The Container Storage Interface
- Summary
-
Running Stateful Applications with Kubernetes
-
Stateful versus stateless applications in Kubernetes
- Understanding the nature of distributed data-intensive apps
- Why manage the state in Kubernetes?
- Why manage the state outside of Kubernetes?
-
Shared environment variables versus DNS records for discovery
- Accessing external data stores via DNS
- Accessing external data stores via environment variables
- Consuming a ConfigMap as an environment variable
- Using a redundant in-memory state
- Using DaemonSet for redundant persistent storage
- Applying persistent volume claims
- Utilizing StatefulSet
- Working with StatefulSets
- Running a Cassandra cluster in Kubernetes
- Summary
-
Stateful versus stateless applications in Kubernetes
- Deploying and Updating Applications
- Packaging Applications
-
Exploring Kubernetes Networking
- Understanding the Kubernetes networking model
- Kubernetes network plugins
- Kubernetes and eBPF
- Kubernetes networking solutions
- Using network policies effectively
- Load balancing options
- Writing your own CNI plugin
- Summary
-
Running Kubernetes on Multiple Clusters
- Stretched Kubernetes clusters versus multi-cluster Kubernetes
- The history of cluster federation in Kubernetes
- Cluster API
- Karmada
- Clusternet
- Clusterpedia
- Open Cluster Management
- Virtual Kubelet
- Introducing the Gardener project
- Summary
- Serverless Computing on Kubernetes
- Monitoring Kubernetes Clusters
- Utilizing Service Meshes
-
Extending Kubernetes
- Working with the Kubernetes API
- Extending the Kubernetes API
- Writing Kubernetes plugins
- Employing access control webhooks
- Additional extension points
- Summary
- Governing Kubernetes
-
Running Kubernetes in Production
- Understanding Managed Kubernetes in the cloud
- Managing multiple clusters
- Building effective processes for large-scale Kubernetes deployments
- Handling infrastructure at scale
- Managing clusters and node pools
- Bin packing and utilization
- Upgrading Kubernetes
- Troubleshooting
- Cost management
- Summary
- The Future of Kubernetes
- Other Books You May Enjoy
- Index
Product information
- Title: Mastering Kubernetes - Fourth Edition
- Author(s):
- Release date: June 2023
- Publisher(s): Packt Publishing
- ISBN: 9781804611395
You might also like
book
Kubernetes: Up and Running, 3rd Edition
This third edition comes with a dedicated playlist of interactive Katacoda labs mapped to each section …
video
Getting Started with Kubernetes, 3rd Edition
6 Hours of Video Instruction Learn how to use, deploy, and manage Kubernetes in six hours …
video
Certified Kubernetes Administrator (CKA), 3rd Edition
8 Hours of Video Instruction Get the edge you need to successfully study for and pass …
book
Certified Kubernetes Application Developer (CKAD) Study Guide, 2nd Edition
Developers with the ability to operate, troubleshoot, and monitor applications in Kubernetes are in high demand …