Kubernetes Design Patterns and Extensions

Book description

Master the art of container management with Kubernetes and study robust container orchestration to ensure that your container-based applications sail into production without hiccups

Key Features

  • Implement best practices in cloud-native applications using Kubernetes
  • Explore the usage of client libraries and programmatic access to Kubernetes
  • Use your domain expertise to code

Book Description

Before plunging into how Kubernetes works, this book introduces you to the world of container orchestration and describes the recent changes in application development. You'll understand problems that Kubernetes solves and get to grips with using Kubernetes resources to deploy applications. In addition to this, you'll learn to apply the security model of Kubernetes clusters.

Kubernetes Design Patterns and Extensions describes how services running in Kubernetes can leverage the platform's security features. Once you've grasped all this, you'll explore how to troubleshoot Kubernetes clusters and debug Kubernetes applications. You also discover how to analyze the networking model and its alternatives in Kubernetes, and apply best practices with design patterns.

By the end of this book, you'll have studied all about using the power of Kubernetes for managing your containers.

What you will learn

  • Understand and classify software designs as per the cloud-native paradigm
  • Apply best practices in Kubernetes with design patterns
  • Set up Kubernetes clusters in managed and unmanaged environments
  • Explore Kubernetes extension points
  • Extend Kubernetes with custom resources and controllers
  • Integrate dynamic admission controllers
  • Develop and run custom schedulers in Kubernetes
  • Analyze networking models in Kubernetes

Who this book is for

Kubernetes Design Patterns and Extensions is for you if you are interested in configuring and troubleshooting Kubernetes clusters and developing microservices-based applications on Kubernetes clusters. DevOps engineers with basic knowledge of Docker will also find this book useful. It is assumed that you are comfortable using command-line tools and programming concepts and languages.

Publisher resources

View/Submit Errata

Table of contents

  1. Title
  2. Copyright and Credits
    1. Kubernetes Design Patterns and Extensions
  3. Contributor
    1. About the Author
    2. Packt Is Searching for Authors like You
  4. Packt Upsell
    1. Why Subscribe?
    2. PacktPub.com
  5. Preface
    1. Who This Book Is For
    2. What This Book Covers
    3. To Get the Most out of This Book
      1. Download the Example Code Files
      2. Conventions Used
    4. Get in Touch
      1. Reviews
  6. Kubernetes Design Patterns
    1. Software Design Patterns
      1. Uses of Software Design Patterns
      2. Classification of Software Design Patterns
    2. Kubernetes Design Patterns
      1. Structural Patterns
        1. Sidecar Pattern
      2. Activity: Running a Web Server with Synchronization
        1. Initialization Pattern
      3. Activity: Running a Web Server after Content Preparation
      4. Behavioral Patterns
        1. Job Pattern
        2. Scheduled Job Pattern
        3. Daemon Service Pattern
        4. Singleton Service Pattern
        5. Introspective Pattern
      5. Activity: Injecting Data into Applications
      6. Deployment Strategies
        1. Recreate Strategy
      7. Deploying the Application Using the Recreate Strategy
        1. Rolling Update Strategy
        2. Deploying an Application Using the Rolling Update Strategy
        3. Blue/Green Strategy
        4. Deploying an Application Using the Blue/Green Strategy
        5. A/B Testing Strategy
      8. Deployment Strategies Summary
    3. Summary
  7. Kubernetes Client Libraries
    1. Accessing the Kubernetes API
      1. Kubernetes API Style
      2. Getting a JSON Response from the Kubernetes API
      3. Accessing the Kubernetes API
      4. Connecting to the Kubernetes API and Creating Namespaces
      5. Accessing the Kubernetes API inside a Cluster
      6. To Connect to the Kubernetes API inside a Cluster
    2. Official Client Libraries
      1. Go Client Library
        1. Repository
        2. Documentation
        3. Installation
        4. Creating Configuration
        5. Creating Clientset
        6. Making API Calls
      2. To Use the Kubernetes Go Client outside the Cluster
      3. Activity: Using the Kubernetes Go Client inside the Cluster
      4. Python Client Library
        1. Repository
        2. Installation
        3. Client Usage
        4. Packaging
      5. Using the Kubernetes Python Client inside the Cluster
        1. Other Official Client Libraries
    3. Community-Maintained Client Libraries
    4. Summary
  8. Kubernetes Extensions
    1. Kubernetes Extension Points
    2. Extending Kubernetes Clients
    3. Extending the Kubernetes API
      1. Custom Resource Definitions
      2. Creating and Deploying Custom Resource Definitions
      3. Custom Controllers
        1. Operator Development
          1. Kubernetes Sample Controller
          2. Operator Framework
      4. Creating and Deploying the Kubernetes Operator
    4. Kubernetes Dynamic Admission Control
      1. Admission Webhooks
      2. Initializers
    5. Extending the Kubernetes Scheduler
      1. Node Labels
        1. Node Selectors
        2. Node Affinity
        3. Pod Affinity
        4. Taints and Tolerations
        5. Custom Scheduler Development
      2. Deploying and using a Custom Kubernetes Scheduler
    6. Extending Kubernetes Infrastructure
    7. Summary
  9. Solutions
    1. Chapter 1:  Kubernetes Design Patterns
      1. Activity: Running a Web Server with Synchronization
      2. Activity: Running a Web Server after Content Preparation
      3. Activity: Injecting Data into Applications
    2. Chapter 2:  Kubernetes Client Libraries
      1. Activity: Using the Kubernetes Go Client inside the Cluster
  10. Other Books You May Enjoy
    1. Leave a Review - Let Other Readers Know What You Think

Product information

  • Title: Kubernetes Design Patterns and Extensions
  • Author(s): Onur Yilmaz
  • Release date: September 2018
  • Publisher(s): Packt Publishing
  • ISBN: 9781789619270