Book Image

Kubernetes Design Patterns and Extensions

By : Onur Yılmaz
Book Image

Kubernetes Design Patterns and Extensions

By: Onur Yılmaz

Overview of this book

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.
Table of Contents (6 chapters)

To Get the Most out of This Book

We assume that you are comfortable with command-line tools and computer programming concepts and languages. The minimum hardware requirements are: Intel Core i7 or equivalent, 8 GB RAM, 35 GB hard disk, and a stable internet connection. You'll also need the following software installed in advance:

  • Access to a Kubernetes cluster with the version equal to or higher than 1.10
    Local Kubernetes solutions such as minikube or clusters living in cloud providers:
  • Kubernetes command line tool kubectl is required for accessing Kubernetes from terminal:
  • Docker client and server with the minimum version of 18.03 are required for building and testing the client libraries:
  • Installing Python and Go are not required, however recommended for playing around with the client libraries locally:

Download the Example Code Files

You can download the example code files for this book from your account at If you purchased this book elsewhere, you can visit and register to have the files emailed directly to you.

You can download the code files by following these steps:

  1. Log in or register at
  2. Select the SUPPORT tab.
  3. Click on Code Downloads & Errata.
  4. Enter the name of the book in the Search box and follow the onscreen instructions.

Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:

  • WinRAR/7-Zip for Windows
  • Zipeg/iZip/UnRarX for Mac
  • 7-Zip/PeaZip for Linux

The code bundle for the book is also hosted on GitHub at In case there's an update to the code, it will be updated on the existing GitHub repository.

We also have other code bundles from our rich catalog of books and videos available at Check them out!

Conventions Used

There are a number of text conventions used throughout this book.

CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "With this method, kubectl securely connects to the API server with its own credentials and creates a proxy for the applications on the local system."

A block of code is set as follows:


When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

curl -X POST http://localhost:8080/api/v1/namespaces/  \
--header "Content-Type:application/json" \

Activity: These are scenario-based activities that will let you practically apply what you've learned over the course of a complete section. They are typically in the context of a real-world problem or situation.

Warnings or important notes appear like this.