O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Kubernetes Best Practices

Book Description

You’ve learned everything there is to know about Kubernetes. Now it’s time to put that knowledge into practice. With this practical book, tech leads, DevOps engineers, developers, and architects will learn real-world best practices for putting Kubernetes into action with actual applications. You’ll understand how to build and deploy complete solutions in Kubernetes—everything from CI/CD to application design, deployments, and experiments. You’ll also learn how other companies have delivered solutions in Kubernetes.

Table of Contents

  1. 1. Setting Up a Basic Service
    1. Application Overview
    2. Managing Configuration Files
    3. Creating a Replicated Service Using Deployments
      1. Best Practices for Image Management
      2. Creating a Replicated Application
    4. Setting Up an External Ingress for HTTP Traffic
    5. Configuring an Application with ConfigMaps
    6. Managing Authentication with Secrets
    7. Deploying a Simple Stateful Database
    8. Creating a TCP Load Balancer with Service
    9. Setting Up a Replicated Cache
    10. Using Ingress to Route Traffic to a Static File Server
    11. Parameterizing Your Application with Helm
    12. Summary
  2. 2. Supporting Developers and Developer Workflows.
    1. Goals
    2. Building a Development Cluster
    3. Setting Up a Shared Cluster for Multiple Developers
      1. Onboarding Users
      2. Creating and Securing a Namespace
      3. Managing Namespaces
      4. Cluster Level Services
    4. Enabling Developer Workflows
    5. Initial Setup
    6. Enabling Active Development
    7. Enabling Testing and Debugging
    8. Summary
  3. 3. Monitoring And Logging In Kubernetes
    1. Monitoring Techniques
    2. Monitoring Patterns
    3. Kubernetes Metrics Overview
      1. cAdvisor
      2. Metrics Server
      3. Kube-State-Metrics
    4. What Metrics Do I Monitor?
    5. Monitoring Tools
    6. Monitoring Kubernetes with Prometheus
    7. Logging Overview
    8. Logging Patterns
    9. Tools for Logging
    10. Logging with EFK Stack
    11. Alerting
    12. Summary
      1. Monitoring
      2. Logging
      3. Alerting
  4. 4. Configuration, Secrets, and RBAC
    1. Introduction
    2. Configuration through ConfigMaps and Secrets
      1. ConfigMaps
      2. Secrets
    3. Role Based Access Control
      1. RBAC Primer
      2. RBAC Best Practices
    4. Wrap Up
  5. 5. Continuous Integration, Testing, and Deployment
    1. Version Control
    2. Continuous Integration
    3. Testing
    4. Container Builds
    5. Container Image Tagging
    6. Continuous Deployment
    7. Deployment Strategies
    8. Testing in Production
    9. Setting Up a Pipeline and Performing a Chaos Experiment
      1. Setup CI
      2. Setup CD
      3. Perform Rolling Upgrade
      4. Simple Chaos Experiment
    10. Summary
  6. 6. Versioning, Releases, and Rollouts
    1. Overview
    2. Versioning
    3. Releases
    4. Rollouts
    5. Putting It All Together
      1. Best Practices for Versioning, Releases, and Rollouts
    6. Wrap Up
  7. 7. Worldwide Application Distribution and Staging
    1. Distributing Your Image
    2. Parameterizing Your Deployment
    3. Load Balancing Traffic Around the World
    4. Reliably Rolling Out Software around the World
      1. Pre-rollout Validation
      2. Canary Region
      3. Identifying Region Types
      4. Constructing a Global Rollout
    5. When Something Goes Wrong
    6. Summary