This tutorial leverages the Azure Cloud to streamline provisioning of the compute infrastructure required to bootstrap a Kubernetes cluster from the ground up.
To begin, Sign up for for a free account and $200 in credits.
In Azure Free Trial there is a limit of 4 Cores available, therefore tutorial instructions must be changed to create 4 nodes instead of 6 (2 controllers and 2 workers).
The Estimated cost to run this tutorial: $0.4 per hour ($10 per day).
The compute resources required for this tutorial will not exceed the Microsoft Azure free tier.
We will use the Azure Command Line Interface throughout this tutorial and the examples will be written in bash
shell.
Follow the Azure CLI 2.0 documentation to install and configure the az
command line utility.
Verify the Azure CLI 2.0 version is 2.1.0 or higher:
az --version
This tutorial was verified to work on Ubuntu via WSL2, and Visual Studio Code on Windows using the following versions:
az cli: 2.14.0
bash: 4.4.20
Ubuntu: 18.04 (bionic)
If you are starting from scratch, here is a good article on how to install and configure all these components: Running Ubuntu on Windows 10 with WSL2
From your bash prompt run:
az login
and follow the instructions to log in.
If you have more than one Azure Subscription (a free account can only have one), select the one you want to use. To see the list of your Azure Subscriptions run:
az account list -o table
To select the Subscription to use run:
az account set --subscription "<Your subscription Name or Id>"
To create a resource group named 'kubernetes' to host the resources needed for the tutorial in the eastus2
location, run:
az group create -n kubernetes -l eastus2
You can use the
az account list-locations
command to view additional locations.
tmux can be used to run commands on multiple compute instances at the same time. Labs in this tutorial may require running the same commands across multiple compute instances, in those cases consider using tmux and splitting a window into multiple panes with synchronize-panes
enabled to speed up the provisioning process.
The use of tmux is optional and not required to complete this tutorial.
Enable
synchronize-panes
:ctrl+b
thenshift :
. Then typeset synchronize-panes on
at the prompt. To disable synchronization:set synchronize-panes off
.