In this challenge you will learn:
- What prerequisites are needed for dealing with Kubernetes and Azure Kubernetes Service
- How to install them
The repository is located at GitHub, so - obviously - we'll need a local Git client to interact with the repository. Download and install the appropriate version of Git for you here: https://git-scm.com/download
We will be using the Azure command line interface to create and interact with resources running in Azure.
To install it, go to https://docs.microsoft.com/cli/azure/install-azure-cli?view=azure-cli-latest and choose your platform.
When finished, login to your Azure account from the command line:
$ az login
You have logged in. Now let us find all the subscriptions to which you have access...
A browser window will open, login to Azure and go back to the command prompt. Your active subscription will be shown as JSON, e.g.:
{
"cloudName": "AzureCloud",
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"isDefault": false,
"name": "Your Subscription Name",
"state": "Enabled",
"tenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"user": {
"name": "xxx@example.com",
"type": "user"
}
}
If you have multiple subscriptions, make sure your are working with the correct one!
$ az account show
{
"cloudName": "AzureCloud",
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"isDefault": false,
"name": "Your Subscription Name",
"state": "Enabled",
"tenantId": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"user": {
"name": "xxx@example.com",
"type": "user"
}
}
If that is not the correct one, follow these steps below:
$ az account list -o table
[the list of available subscriptions is printed]
$ az account set -s <SUBSCRIPTIONID_YOU_WANT_TO_USE>
kubectl
is the command line interface for Kubernetes. You will need the tool to interact with the cluster, e.g. to create a pod, a deployment or a service.
If you already have the Azure CLI on your machine, you can just install it using the following command:
az aks install-cli
or refer to the documentation for you specific platform.
Helm
is the package manager for Kubernetes. We will need it for installing several 3rd party components for our solution:
https://helm.sh/docs/intro/install/
Terraform
is an open-source "infrastructure as code" software tool created by HashiCorp. It is a tool for building, changing, and versioning infrastructure safely and efficiently. We will use terraform to create several PaaS services like Azure SQL Db, CosmosDB etc. in this workshop.