Chapter 5. Creating a Kubernetes Cluster in Azure

Now that you understand the basics of how a Kubernetes cluster works under the hood, it’s time to put that knowledge to the test and actually build and use a Kubernetes cluster. Several tools are available for creating and running a Kubernetes cluster in a production environment with high availability. Some of the more common tools are kops, kubeadm, Kubespray, and Rancher. These tools have prewritten playbooks on building a cluster that can be run in a production environment seamlessly with a combination of technologies.

We will not use a prebuilt tool in this chapter. Instead, we will take a more hands-on approach to building a cluster that you can use in a production environment.

Creating a Kubernetes Cluster from Scratch

In this section, we will build a Kubernetes cluster from scratch using Ansible, Terraform, and Packer. We will show you how to manually build the cluster to give you a better understanding of the cluster’s various components. While this is not the preferred way to build or run a production-grade Kubernetes cluster, it will provide you with good foundational knowledge.

To get started, you’ll need to clone the GitHub for this book and open the Chapter5 folder. This chapter assumes you have already set up your Azure account by following the steps in Chapter 2, and that you have experimented with creating the infrastructure using the Terraform, Packer, and Ansible playbooks.

We arranged the code in the ...

Get Cloud Native Infrastructure with Azure now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.