Book description
Effectively build, manage, and secure your Kubernetes workloads to implement CI/CD
Key Features
- Gain a complete understanding of how Rancher works
- Discover how to design and deploy Kubernetes clusters using Rancher
- Understand how to extend Kubernetes and Rancher's capabilities to take your apps to the next level
Book Description
Knowing how to use Rancher enables you to manage multiple clusters and applications without being locked into a vendor's platform. This book will guide you through Rancher's capabilities while deepening your understanding of Kubernetes and helping you to take your applications to a new level.
The book begins by introducing you to Rancher and Kubernetes, helping you to learn and implement best practices. As you progress through the chapters, you'll understand the strengths and limitations of Rancher and Kubernetes and discover all the different ways to deploy Rancher. You'll also find out how to design and deploy Kubernetes clusters to match your requirements. The concluding chapters will show you how to set up a continuous integration and continuous deployment (CI/CD) pipeline for deploying applications into a Rancher cluster, along with covering supporting services such as image registries and Helm charts.
By the end of this Kubernetes book, you'll be able to confidently deploy your mission-critical production workloads on Rancher-managed Kubernetes clusters.
What you will learn
- Deploy Rancher in a production-ready configuration
- Architect an application cluster to support mission-critical workloads
- Build the type of Kubernetes cluster that makes sense for your environment
- Discover the tools and services needed to make a new, ready-to-deploy cluster
- Prepare your applications to be deployed into Rancher for Kubernetes
- Expand your Kubernetes cluster by providing additional services such as Longhorn, OPA, and monitoring
Who this book is for
This book is for DevOps engineers looking to deploy Kubernetes in a fast and easy way. A basic understanding of Linux administration and containerization is needed to get the most out of this book.
Table of contents
- Rancher Deep Dive
- Contributors
- About the author
- About the reviewer
- About SUSE
- Preface
- Part 1 – Rancher Background and Architecture and Design
- Chapter 1: Introduction to Rancher and Kubernetes
-
Chapter 2: Rancher and Kubernetes High-Level Architecture
- What is the Rancher server?
- What are RKE and RKE2?
- What is K3s (five less than K8s)?
- What is RancherD?
- What controllers run inside the Rancher server pods?
- What do the Cattle agents do?
- How does Rancher provision nodes and clusters?
- What are kube-apiserver, kube-controller-manager, kube-scheduler, etcd, and kubelet?
- How do the current state and the desired state work?
- Summary
- Part 2 – Installing Rancher
- Chapter 3: Creating a Single Node Rancher
- Chapter 4: Creating an RKE and RKE2 Cluster
- Chapter 5: Deploying Rancher on a Hosted Kubernetes Cluster
- Part 3 – Deploying a Kubernetes Cluster
- Chapter 6: Creating an RKE Cluster Using Rancher
- Chapter 7: Deploying a Hosted Cluster with Rancher
- Chapter 8: Importing an Externally Managed Cluster into Rancher
- Part 4 – Getting Your Cluster Production-Ready
-
Chapter 9: Cluster Configuration Backup and Recovery
- What is an etcd backup?
- Why do I need to back up my etcd?
- How does an etcd backup work?
- How does an etcd restore work?
- When do you need an etcd restore?
- What does an etcd backup not protect?
- How do you configure etcd backups?
- How do you take an etcd backup?
- How do you restore from an etcd backup?
- Setting up a lab environment to test common failure scenarios
- Summary
-
Chapter 10: Monitoring and Logging
- What is Prometheus and Grafana?
- Deploying Rancher's monitoring stack
- Adding custom application metrics to Prometheus
- Creating alert rules in Prometheus
- Creating a Grafana dashboard
- What is the Banzai Cloud Logging operator?
- What is Fluent Bit and Fluentd?
- Deploying Rancher logging
- Filtering application logs
- Writing logs to multiple log servers
- Summary
-
Chapter 11: Bringing Storage to Kubernetes Using Longhorn
- What is persistent storage and why do we need it in Kubernetes?
- What is Longhorn?
- How does Longhorn work?
- Pros and cons of Longhorn
- Rules for architecting a Longhorn solution
- Installing Longhorn
- How do Longhorn upgrades work?
- Critical maintenance tasks for keeping Longhorn at 100%
- Troubleshooting common Longhorn issues
- Summary
-
Chapter 12: Security and Compliance Using OPA Gatekeeper
- Why should I care about security in Kubernetes?
- How do I enforce standards and security policies in Kubernetes?
- What is OPA Gatekeeper?
- How to install OPA Gatekeeper from the marketplace
- Best practices and standard policies
- How do I scan my cluster for security issues?
- How do I lock down my cluster?
- Deploying Rancher CIS scan
- Additional security tools for protecting a cluster
- Summary
- Chapter 13: Scaling in Kubernetes
-
Chapter 14: Load Balancer Configuration and SSL Certificates
- Why do we need an external load balancer to support a Kubernetes cluster?
- Rules for architecting a solution
- Configuring F5 in TCP and HTTP mode
- Configuring HAProxy to work with Kubernetes
- Installing and configuring MetalLB
- What is ingress in Kubernetes?
- How to add an SSL certificate to an ingress
- Summary
-
Chapter 15: Rancher and Kubernetes Troubleshooting
- Recovering an RKE cluster from an etcd split-brain
- Rebuilding from an etcd backup
- How to resolve Pods not being able to be scheduled due to OPA Gatekeeper
- A runaway app stomping all over a cluster
- Can rotating kube-ca break my cluster?
- How to fix a namespace that is stuck in terminating status
- General troubleshooting for RKE clusters
- Summary
- Part 5 – Deploying Your Applications
-
Chapter 16: Setting Up a CI/CD Pipeline and Image Registry
- What is a CI/CD pipeline?
- Rules for architecting a solution
- How to deploy Drone and its runners in Kubernetes with Rancher
- Injecting secrets into a pipeline
- What an image repository is and the rules for architecting a solution
- How to deploy Harbor in Kubernetes
- Integrating a private registry into a Kubernetes cluster
- Summary
- Chapter 17: Creating and Using Helm Charts
- Chapter 18: Resource Management
- Other Books You May Enjoy
Product information
- Title: Rancher Deep Dive
- Author(s):
- Release date: July 2022
- Publisher(s): Packt Publishing
- ISBN: 9781803246093
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 …
book
Terraform: Up and Running, 3rd Edition
Terraform has become a key player in the DevOps world for defining, launching, and managing infrastructure …
video
Kubernetes for the Absolute Beginners - Hands-On
Starting from the fundamental concept of containers, the course gradually unfolds into a comprehensive guide on …
video
Certified Kubernetes Administrator (CKA), 3rd Edition
8 Hours of Video Instruction Get the edge you need to successfully study for and pass …