ipahbacsvcgroup.py
-
Thomas Woerner authored
This patch is needed to pass Automation Hub tests.
Thomas Woerner authoredThis patch is needed to pass Automation Hub tests.
Setting up your first cluster with Kubespray
This tutorial walks you through the detailed steps for setting up Kubernetes with Kubespray.
The guide is inspired on the tutorial Kubernetes The Hard Way, with the difference that here we want to showcase how to spin up a Kubernetes cluster in a more managed fashion with Kubespray.
Target Audience
The target audience for this tutorial is someone looking for a hands-on guide to get started with Kubespray.
Cluster Details
- kubespray v2.13.x
- kubernetes v1.17.9
Prerequisites
- Google Cloud Platform: This tutorial leverages the Google Cloud Platform to streamline provisioning of the compute infrastructure required to bootstrap a Kubernetes cluster from the ground up. Sign up for $300 in free credits.
- Google Cloud Platform SDK: Follow the Google Cloud SDK documentation to install and configure the
gcloud
command line utility. Make sure to set a default compute region and compute zone. - The kubectl command line utility is used to interact with the Kubernetes API Server.
- Linux or Mac environment with Python 3
Provisioning Compute Resources
Kubernetes requires a set of machines to host the Kubernetes control plane and the worker nodes where containers are ultimately run. In this lab you will provision the compute resources required for running a secure and highly available Kubernetes cluster across a single compute zone.
Networking
The Kubernetes networking model assumes a flat network in which containers and nodes can communicate with each other. In cases where this is not desired network policies can limit how groups of containers are allowed to communicate with each other and external network endpoints.
Setting up network policies is out of scope for this tutorial.
Virtual Private Cloud Network
In this section a dedicated Virtual Private Cloud (VPC) network will be setup to host the Kubernetes cluster.
Create the kubernetes-the-kubespray-way
custom VPC network:
gcloud compute networks create kubernetes-the-kubespray-way --subnet-mode custom
A subnet must be provisioned with an IP address range large enough to assign a private IP address to each node in the Kubernetes cluster.
Create the kubernetes
subnet in the kubernetes-the-hard-way
VPC network: