0%

The cloud is becoming the de facto home for companies ranging from enterprises to startups. Moving to the cloud means moving your applications from monolith to microservices. But once you do, running and maintaining these services brings its own level of complexity. The answer? Modularity, deployability, observability, and self-healing capacity through cloud native development.

With this practical book, Nishant Singh and Michael Kehoe show you how to build a true cloud native infrastructure using Microsoft Azure or another cloud computing solution by following guidelines from the Cloud Native Computing Foundation (CNCF). DevOps and site reliability engineers will learn how adapting applications to cloud native early in the design phase helps you fully utilize the elasticity and distributed nature of the cloud.

This book helps you explore:

  • Why go cloud native?
  • How to use infrastructure as code
  • What it takes to containerize an application
  • Why and how Kubernetes is the "grand orchestrator"
  • How to create a Kubernetes cluster on Azure
  • How observability complements monitoring
  • How to use service discovery and a service mesh to find new territories
  • How networking and policy management serve as gatekeepers
  • How distributed databases and storage work

Table of Contents

  1. Preface
    1. Who Should Read This Book
    2. Goals of This Book
    3. Navigating This Book
    4. Conventions Used in This Book
    5. Using Code Examples
    6. O’Reilly Online Learning
    7. How to Contact Us
    8. Acknowledgments
  2. 1. Introduction: Why Cloud Native?
    1. The Journey to the Cloud
    2. Challenges in the Cloud
    3. Cloud Native Computing Foundation
    4. Adopting a Cloud Native Infrastructure with Azure
    5. Summary
  3. 2. Infrastructure as Code: Setting Up the Gateway
    1. Infrastructure as Code and Its Importance in the Cloud Native World
    2. Getting Started with Azure and Setting Up the Environment
    3. Azure Fundamentals and Preparing Your Azure Environment
    4. Creating an Azure Account
    5. Installing the Azure CLI
    6. Prominent IaC Tools
    7. Terraform
    8. Packer
    9. Ansible
    10. Azure DevOps and Infrastructure as Code
    11. Summary
  4. 3. Containerizing Your Application: More Than Boxes
    1. Why Containers?
    2. Isolation
    3. Security
    4. Packaging and Deployment
    5. Basic Container Primitives
    6. Cgroups
    7. Namespaces
    8. Copy on Write
    9. Capabilities
    10. Seccomp-BPF
    11. Components of Running a Container
    12. Container Orchestrators
    13. Container Software
    14. Container Runtimes
    15. Containers
    16. Operating System
    17. Open Container Initiative (OCI) Specification
    18. OCI Image Specification
    19. OCI Runtime Specification
    20. Docker
    21. Building Your First Docker Image
    22. Best Practices While Using Docker
    23. Other Container Platforms
    24. Kata Containers
    25. LXC and LXD
    26. Container Registries
    27. Securely Storing Images with Harbor
    28. Securely Storing Images with Azure Container Registry
    29. Storing Docker Images in a Registry
    30. Running Docker on Azure
    31. Azure Container Instances
    32. Deploying an Azure Container Instance
    33. Running a Docker Container Engine
    34. Summary
  5. 4. Kubernetes: The Grand Orchestrator
    1. Kubernetes Components
    2. Control Plane
    3. Worker Nodes
    4. Kubernetes API Server Objects
    5. Pods
    6. ReplicaSets
    7. Deployments
    8. Services
    9. Namespaces
    10. Labels and Selectors
    11. Annotations
    12. Ingress Controller
    13. StatefulSets
    14. DaemonSets
    15. Jobs
    16. Observe, Operate, and Manage Kubernetes Clusters with kubectl
    17. General Cluster Information and Commands
    18. Managing Pods
    19. Kubernetes in Production
    20. Summary
  6. 5. Creating a Kubernetes Cluster in Azure
    1. Creating a Kubernetes Cluster from Scratch
    2. Creating the Resource Group
    3. Creating the Machine Images for the Worker and Controller Machines
    4. Creating a Storage Account Backend
    5. Creating an Azure Virtual Network
    6. Creating Public IPs for the Load Balancer
    7. Creating Worker and Controller Instances
    8. Using Ansible to Deploy and Configure the Kubernetes Controller Nodes
    9. Using Ansible to Deploy and Configure the Kubernetes Worker Nodes
    10. Setting Up Pod Networking and Routing
    11. Generating the kubeconfig File for Remote Access and Cluster Validation
    12. Azure Kubernetes Service
    13. Deploying Applications and Services Using Helm: A Package Manager for Kubernetes
    14. Helm Basics
    15. Installing and Managing Helm
    16. Managing Helm Releases
    17. Creating Charts for Your Applications
    18. Summary
  7. 6. Observability: Following the Breadcrumbs
    1. Introduction to Observability
    2. Observability: More Than Three Pillars
    3. Observability: A Superset of Monitoring
    4. Observability-Driven Development
    5. Monitoring Metrics with Prometheus in a Cloud Native World
    6. Prometheus Components and Architecture
    7. Installing and Configuring Prometheus
    8. node_exporter
    9. Instrumentation of Applications
    10. Finding Hosts
    11. Prometheus on Kubernetes
    12. Logging in the Cloud Native World
    13. Logging with Fluentd
    14. Fluentd on Kubernetes
    15. Distributed Tracing in the Cloud Native World
    16. Tracing: Key Concepts
    17. General Tracing System Architecture and Trace Assembly
    18. Tracing Standards, Tools, and Code Instrumentation
    19. Azure Monitor
    20. Summary
  8. 7. Service Discovery and Service Mesh: Finding New Territories and Crossing Borders
    1. Service Discovery
    2. Introduction to CoreDNS
    3. Installing and Configuring CoreDNS
    4. Kubernetes Service Discovery with CoreDNS
    5. Azure DNS
    6. The Service Mesh
    7. Introduction to Istio
    8. Installing Istio on Azure Kubernetes Service
    9. Automatically Injecting the Sidecar Proxy (Envoy Proxy)
    10. Managing Istio Service Meshes Using Kiali
    11. Summary
  9. 8. Networking and Policy Management: Behold the Gatekeepers
    1. The Container Network Interface (CNI)
    2. Why Would You Use a CNI?
    3. How Does CNI Work with Azure?
    4. Various CNI Projects
    5. Calico
    6. Why Would You Use Calico?
    7. Basic Architecture
    8. Deploying Calico
    9. A Calico Deep Dive
    10. Implementing Calico Security Policy
    11. Cilium
    12. Deploying Cilium
    13. Integrating Cilium with Your Cloud
    14. Flannel
    15. Deploying Flannel
    16. A Flannel Deep Dive
    17. Azure Policy
    18. Azure Policy Quickstart
    19. Creating Your Own Azure Policy
    20. Azure Policy for Kubernetes
    21. Open Policy Agent
    22. Deploying OPA on Kubernetes
    23. Deploying Policy with OPA
    24. Summary
  10. 9. Distributed Databases and Storage: The Central Bank
    1. The Need for Distributed Databases in Cloud Native Architecture
    2. Azure Storage and Database Options
    3. Introduction to Vitess: Distributed and Sharded MySQL
    4. Why Run Vitess?
    5. The Vitess Architecture
    6. Deploying Vitess on Kubernetes
    7. Introduction to Rook: Storage Orchestrator for Kubernetes
    8. The Rook Architecture
    9. Deploying Rook on Kubernetes
    10. Introduction to TiKV
    11. Why Use TiKV?
    12. The TiKV Architecture
    13. Deploying TiKV on Kubernetes
    14. More on etcd
    15. Hardware Platform
    16. Autoscaling and Auto-remediation
    17. Availability and Security
    18. Summary
  11. 10. Getting the Message
    1. The Need for Messaging
    2. A Sample Messaging Use Case: Log Ingestion and Analytics
    3. Generation 1: Without Queues
    4. Generation 2: With Cloud Queues and Object Storage
    5. Generation 3: With Memory-Based Pub/Sub Queuing
    6. The Basics of Messaging Platforms
    7. Messaging Versus Streaming
    8. Messaging Fundamentals
    9. Producers and Consumers
    10. Brokers and Clustering
    11. Durability and Persistence
    12. Message Delivery
    13. Security
    14. Common Messaging Patterns
    15. Simple Queue
    16. Publish and Subscribe
    17. Durable Queue
    18. An Overview of Popular Cloud Native Messaging Platforms
    19. RabbitMQ
    20. Apache Kafka
    21. CNCF CloudEvents
    22. Cloud Messaging Deep Dive with NATS
    23. NATS Protocol Architecture
    24. NATS Persistence with JetStream
    25. NATS Security
    26. Deploying NATS on Kubernetes
    27. Azure Messaging Services
    28. Azure Service Bus
    29. Azure Event Hubs
    30. Azure Event Grid
    31. Summary
  12. 11. Serverless
    1. Introduction to Serverless Computing
    2. What Is Serverless?
    3. What Is a Serverless Function?
    4. The Serverless Landscape
    5. Benefits of Serverless
    6. Potential Downsides of Serverless
    7. Azure Function Apps
    8. Function App Architecture
    9. Creating a Function App
    10. Knative
    11. Knative Architecture
    12. Installing and Running Knative Serving on Kubernetes
    13. Installing and Running Knative Eventing on Kubernetes
    14. KEDA
    15. KEDA Architecture
    16. Installing KEDA on Kubernetes
    17. OpenFaaS
    18. OpenFaaS Architecture
    19. Installing OpenFaaS
    20. Writing Your First OpenFaaS Function
    21. Summary
  13. 12. Conclusion
    1. What’s Next?
  14. Index
  15. About the Authors
3.145.191.169