From managing versioning efficiently to improving security and portability, technologies such as Kubernetes and Docker have greatly helped cloud deployments and application development.
Starting with an introduction to Docker, Kubernetes, and Azure Kubernetes Service (AKS), this book will guide you through deploying an AKS cluster in different ways. You’ll then explore the Azure portal by deploying a sample guestbook application on AKS and installing complex Kubernetes apps using Helm. With the help of real-world examples, you'll also get to grips with scaling your application and cluster. As you advance, you'll understand how to overcome common challenges in AKS and secure your application with HTTPS and Azure AD (Active Directory). Finally, you’ll explore serverless functions such as HTTP triggered Azure functions and queue triggered functions.
By the end of this Kubernetes book, you’ll be well-versed with the fundamentals of Azure Kubernetes Service and be able to deploy containerized workloads on Microsoft Azure with minimal management overhead.
What you will learn
* Plan, configure, and run containerized applications in production
* Use Docker to build apps in containers and deploy them on Kubernetes
* Improve the configuration and deployment of apps on the Azure Cloud
* Store your container images securely with Azure Container Registry
* Install complex Kubernetes applications using Helm
* Integrate Kubernetes with multiple Azure PaaS services, such as databases, Event Hubs and Functions.
Author(s): Nills Franssens, Shivakumar Gopalakrishnan, Gunther Lenz
Edition: 2
Language: English
Pages: 369
Cover
FM
Dedications
Table of Contents
Preface
Section 1: The Basics
Chapter 1: Introduction to Docker and Kubernetes
The software evolution that brought us here
Microservices
DevOps
Fundamentals of Docker containers
Docker images
Kubernetes as a container orchestration platform
Pods in Kubernetes
Deployments in Kubernetes
Services in Kubernetes
Azure Kubernetes Service
Summary
Chapter 2: Kubernetes on Azure (AKS)
Different ways to deploy an AKS cluster
Getting started with the Azure portal
Creating your first AKS cluster
A quick overview of your cluster in the Azure portal
Accessing your cluster using Azure Cloud Shell
Deploying your first demo application
Summary
Section 2: Deploying on AKS
Chapter 3: Application deployment on AKS
Deploying the sample guestbook application
Introducing the application
Deploying the Redis master
Redis master with a ConfigMap
Complete deployment of the sample guestbook application
Exposing the Redis master service
Deploying the Redis slaves
Deploying and exposing the front end
The guestbook application in action
Installing complex Kubernetes applications using Helm
Installing WordPress using Helm
Summary
Chapter 4: Building scalable applications
Scaling your application
Implementing scaling of your application
Scaling the guestbook front-end component
Using the HPA
Scaling your cluster
Manually scaling your cluster
Scaling your cluster using the cluster autoscaler
Upgrading your application
Upgrading by changing YAML files
Upgrading an application using kubectl edit
Upgrading an application using kubectl patch
Upgrading applications using Helm
Summary
Chapter 5: Handling common failures in AKS
Handling node failures
Solving out-of-resource failures
Fixing storage mount issues
Starting the WordPress installation
Using persistent volumes to avoid data loss
Summary
Chapter 6: Securing your application with HTTPS and Azure AD
HTTPS support
Installing an Ingress controller
Adding an Ingress rule for the guestbook application
Getting a certificate from Let's Encrypt
Authentication versus authorization
Authentication and common authN providers
Deploying the oauth2_proxy proxy
Summary
Chapter 7: Monitoring the AKS cluster and the application
Commands for monitoring applications
The kubectl get command
The kubectl describe command
Debugging applications
Logs
Readiness and liveness probes
Building two web containers
Experimenting with liveness and readiness probes
Metrics reported by Kubernetes
Node status and consumption
Pod consumption
Metrics reported from Azure Monitor
AKS Insights
Summary
Section 3: Leveraging advanced Azure PaaS services
Chapter 8: Connecting an app to an Azure database
Setting up OSBA
The benefits of using a managed database service
What is OSBA?
Installing OSBA on the cluster
Deploying OSBA
Deploying WordPress
Securing MySQL
Connecting to the WordPress site
Exploring advanced database operations
Restoring from a backup
Disaster Recovery (DR) options
Reviewing audit logs
Summary
Chapter 9: Connecting to Azure Event Hubs
Deploying a set of microservices
Deploying the application using Helm
Using Azure Event Hubs
Creating the event hub
Modifying the Helm files
Summary
Chapter 10: Securing your AKS cluster
Role-based access control
Creating a new cluster with Azure AD integration
Creating users and groups in Azure AD
Configuring RBAC in AKS
Verifying RBAC
Setting up secrets management
Creating your own secrets
Creating the Docker registry key
Creating the TLS secret
Using your secrets
Secrets as environment variables
Secrets as files
Why secrets as files is the best method
Using secrets stored in Key Vault
Creating a Key Vault
Setting up Key Vault FlexVolume
Using Key Vault FlexVolume to mount a secret in a Pod
The Istio service mesh at your service
Describing the Istio service mesh
Installing Istio
Injecting Envoy as a sidecar automatically
Enforcing mutual TLS
Globally enabling mTLS
Summary
Chapter 11: Serverless functions
Multiple functions platforms
Setting up prerequisites
Azure Container Registry
Creating a development machine
Creating an HTTP-triggered Azure function
Creating a queue-triggered function
Creating a queue
Creating a queue-triggered function
Scale testing functions
Summary
Index