Book description
Get up and running with Kubernetes 1.19 and simplify the way you build, deploy, and maintain scalable distributed systems
Key Features
- Design and deploy large clusters on various cloud platforms
- Explore containerized application deployment, debugging, and recovery with the latest Kubernetes version 1.19
- Become well-versed with advanced Kubernetes topics such as traffic routing or Pod autoscaling and scheduling
Book Description
With its broad adoption across various industries, Kubernetes is helping engineers with the orchestration and automation of container deployments on a large scale, making it the leading container orchestration system and the most popular choice for running containerized applications.
This Kubernetes book starts with an introduction to Kubernetes and containerization, covering the setup of your local development environment and the roles of the most important Kubernetes components. Along with covering the core concepts necessary to make the most of your infrastructure, this book will also help you get acquainted with the fundamentals of Kubernetes. As you advance, you'll learn how to manage Kubernetes clusters on cloud platforms, such as Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP), and develop and deploy real-world applications in Kubernetes using practical examples. Additionally, you'll get to grips with managing microservices along with best practices.
By the end of this book, you'll be equipped with battle-tested knowledge of advanced Kubernetes topics, such as scheduling of Pods and managing incoming traffic to the cluster, and be ready to work with Kubernetes on cloud platforms.
What you will learn
- Manage containerized applications with Kubernetes
- Understand Kubernetes architecture and the responsibilities of each component
- Set up Kubernetes on Amazon Elastic Kubernetes Service, Google Kubernetes Engine, and Microsoft Azure Kubernetes Service
- Deploy cloud applications such as Prometheus and Elasticsearch using Helm charts
- Discover advanced techniques for Pod scheduling and auto-scaling the cluster
- Understand possible approaches to traffic routing in Kubernetes
Who this book is for
This book is for software developers and DevOps engineers looking to understand how to work with Kubernetes for orchestrating containerized applications and services in the cloud. Prior experience with designing software running in operating system containers, as well as a general background in DevOps best practices, will be helpful. Basic knowledge of Kubernetes, Docker, and leading cloud service providers assist with grasping the concepts covered easily.
Table of contents
- THE KUBERNETES BIBLE
- Contributors
- About the authors
- About the reviewer
- Preface
- Section 1: Introducing Kubernetes
-
Chapter 1: Kubernetes Fundamentals
-
Understanding monoliths and microservices
- Understanding the growth of the internet since the late 1990s
- Understanding the need for more frequent software releases
- Understanding the organizational shift to agile methodologies
- Understanding the shift from on-premises to the cloud
- Understanding why the cloud is well suited for scalability
- Exploring the monolithic architecture
- Exploring the microservices architecture
- Choosing between monolithic and microservices architectures
- Understanding containers and Docker
- How can Kubernetes help you to manage your Docker containers?
- Exploring the problems that Kubernetes solves
- Understanding the history of Kubernetes
- Summary
-
Understanding monoliths and microservices
-
Chapter 2: Kubernetes Architecture – From Docker Images to Running Pods
- Understanding the difference between the master and worker nodes
- The kube-apiserver component
- Exploring the kubectl command-line tool and YAML syntax
- The Etcd datastore
- The Kubelet and worker node components
- The kube-scheduler component
- The kube-controller-manager component
- How to make Kubernetes highly available
- Summary
- Chapter 3: Installing Your First Kubernetes Cluster
- Section 2: Diving into Kubernetes Core Concepts
-
Chapter 4: Running Your Docker Containers
- Technical requirements
- Let's explain the notion of Pods
-
Launching your first Pods
- Creating a Pod with imperative syntax
- Creating a Pod with declarative syntax
- Reading the Pod's information and metadata
- Listing the objects in JSON or YAML
- Backing up your resource using the list operation
- Getting more information from the list operation
- Accessing a Pod from the outside world
- Entering a container inside a Pod
- Deleting a Pod
- Labeling and annotating the Pods
- Launching your first job
- Launching your first Cronjob
- Summary
-
Chapter 5: Using Multi-Container Pods and Design Patterns
- Technical requirements
-
Understanding what multi-container Pods are
- Concrete scenarios where you need multi-container Pods
- When not to create a multi-container Pod
- Creating a Pod made up of two containers
- What happens when Kubernetes fails to launch one container in a Pod?
- Deleting a multi-container Pod
- Understanding the Pod deletion grace period
- Accessing a specific container inside a multi-container Pod
- Running commands in containers
- Overriding the default commands run by your containers
- Introducing initContainers
- Accessing the logs of a specific container
- Sharing volumes between containers in the same Pod
- The ambassador design pattern
- The sidecar design pattern
- The adapter design pattern
- Summary
-
Chapter 6: Configuring Your Pods Using ConfigMaps and Secrets
- Technical requirements
- Understanding what ConfigMaps and Secrets are
-
Configuring your Pods using ConfigMaps
- Listing ConfigMaps
- Creating a ConfigMap
- Creating a ConfigMap from literal values
- Storing entire configuration files in a ConfigMap
- Creating a ConfigMap from an env file
- Reading values inside a ConfigMap
- Linking ConfigMaps as environment variables
- Mounting a ConfigMap as a volume mount
- Deleting a ConfigMap
- Updating a ConfigMap
- Managing sensitive configuration with the Secret object
- Summary
-
Chapter 7: Exposing Your Pods with Services
- Technical requirements
-
Why would you want to expose your Pods?
- Understanding Pod IP assignment
- Understanding Pod IP assignment is dynamic
- Never hardcode a pod's IP addresses in your application code
- Understanding how services route traffic to Pods
- Understanding round-robin load balancing in Kubernetes
- Understanding how to call a service in Kubernetes
- Understanding how DNS names are generated for services
- How services get a list of the Pods they service traffic to
- Using the dnsutils Docker image to debug your services
- Why you shouldn't use the --expose flag
- Understanding how DNS names are generated for services
- Understanding the different types of services
-
The NodePort service
- Why do you need NodePort services?
- Creating two containous/whoami Pods
- Understanding NodePort YAML definition
- Making sure NodePort works as expected
- Is this setup production-ready?
- Listing NodePort services
- Adding more Pods to NodePort services
- Describing NodePort services
- Deleting NodePort services
- NodePort or kubectl port-forward?
-
The ClusterIP service
- Why do you need ClusterIP services?
- How do I know if I need NodePort or ClusterIP services to expose my Pods?
- Listing ClusterIP services
- Creating ClusterIP services using the imperative way
- Describing ClusterIP services
- Creating ClusterIP services using the declarative way
- Deleting ClusterIP services
- Understanding headless services
- The LoadBalancer service
- Implementing ReadinessProbe
- Securing your Pods using the NetworkPolicy object
- Summary
-
Chapter 8: Managing Namespaces in Kubernetes
- Technical requirements
- Introduction to Kubernetes namespaces
-
How namespaces impact your resources and services
- Listing namespaces inside your cluster
- Retrieving the data of a specific namespace
- Creating a namespace using imperative syntax
- Creating a namespace using declarative syntax
- Deleting a namespace
- Creating a resource inside a namespace with the -n option
- Listing resources inside a specific namespace
- Listing all the resources inside a specific namespace
- Understanding that names are scoped to a namespace
- Understanding that not all resources are in a namespace
- Resolving a service using namespaces
- Switching between namespaces with kubectl
- Displaying the current namespace with kubectl
- Configuring ResourceQuota and Limit at the namespace level
- Listing ResourceQuota
- Deleting ResourceQuota
- Introducing LimitRange
- Listing LimitRange
- Deleting LimitRange
- Summary
-
Chapter 9: Persistent Storage in Kubernetes
- Technical requirements
-
Why you would want to use PersistentVolume
- Introducing PersistentVolumes
- Introducing PersistentVolume types
- The benefits brought by PersistentVolume
- Introducing access modes
- Understanding that not all access modes are available to all PersistentVolume types
- Creating our first PersistentVolume
- How does Kubernetes PersistentVolumes handle cloud-based storage?
- Amazon EBS PersistentVolume YAML
- GCE PersistentDisk PersistentVolume YAML
- NFS PersistentVolume YAML
- Can Kubernetes handle the provisioning or creation of the resource itself?
- Understanding how to mount a PersistentVolume to your Pod claims
- Understanding the life cycle of a PersistentVolume object in Kubernetes
- Static and dynamic PersistentVolume provisioning
- Summary
- Section 3: Using Managed Pods with Controllers
- Chapter 10: Running Production-Grade Kubernetes Workloads
- Chapter 11: Deployment – Deploying Stateless Applications
- Chapter 12: StatefulSet – Deploying Stateful Applications
- Chapter 13: DaemonSet – Maintaining Pod Singletons on Nodes
- Section 4: Deploying Kubernetes on the Cloud
- Chapter 14: Kubernetes Clusters on Google Kubernetes Engine
- Chapter 15: Launching a Kubernetes Cluster on Amazon Web Services with Amazon Elastic Kubernetes Service
- Chapter 16: Kubernetes Clusters on Microsoft Azure with Azure Kubernetes Service
- Section 5: Advanced Kubernetes
- Chapter 17: Working with Helm Charts
- Chapter 18: Authentication and Authorization on Kubernetes
- Chapter 19: Advanced Techniques for Scheduling Pods
- Chapter 20: Autoscaling Kubernetes Pods and Nodes
- Chapter 21: Advanced Traffic Routing with Ingress
- Other Books You May Enjoy
Product information
- Title: The Kubernetes Bible
- Author(s):
- Release date: February 2022
- Publisher(s): Packt Publishing
- ISBN: 9781838827694
You might also like
book
Kubernetes Patterns, 2nd Edition
This second edition comes with a dedicated playlist of interactive Katacoda labs mapped to sections of …
book
Kubernetes: Up and Running, 3rd Edition
This third edition comes with a dedicated playlist of interactive Katacoda labs mapped to each section …
book
Terraform: Up and Running, 3rd Edition
Terraform has become a key player in the DevOps world for defining, launching, and managing infrastructure …
video
Getting Started with Kubernetes LiveLessons, 2nd Edition
6+ Hours of Video Instruction An updated edition of this video title is available. Please go …