Last week I told you about the new Azure Kubernetes Service (AKS) In Microsoft Azure that offers managed Kubernetes cluster in the cloud and today I’ll show you how to deploy a Kubernetes cluster in Azure.
Released a few weeks ago and currently, in public preview, AKS offer a managed Kubernetes cluster that can be scaled up and on demand without needing to configure Containers, host, storage networks etc.
To get started with AKS, I will create a Kubernetes cluster with one host and will manage it using the Web UI interface and Azure CLI 2.0
Note: To manage the AKS cluster and access the Web UI you need to install Azure CLI 2.0, please visit this article for installation.
From the Azure Portal click on all Services and select Kubernetes Services
In the create cluster page fill in the details, In my case I am creating a new Resource Group will use the latest Kubernetes version
In the scale section, I can select how many Nodes I need in my cluster and size.
In my case, I will use a DS1 V2 machine with 3.5 GB of RAM.
In the Networking section, I will configure the settings below
And enable Monitoring
Once I click on create, Azure will go ahead and create the Kubernetes cluster which will take 5 minutes
As you can see below, Azure created the Container Host
Connect to Cluster
To manage the cluster and create applications, pods, etc, we need to connect to in using Azure CLI 2.0 (Cloud Shell will not work) which will lunch the Kubernetes Web UI management interface.
To connect to my cluster, I will click on the View connection steps under View Kubernetes dashboard
In the connection page details, Microsoft made the connection process extremely easy and all I need to do is open Azure CLI 2.0 on my computer and follow the steps.
Azure CLI 2.0
To install Azure CLI 2.0 visit my article.
To connect to Azure via the CLI I will use the line below
To install the Kubernetes command line tool I run the line below
az aks install-cli
Note the path Azure installs Kubectl.exe because the next commands need to run from that location.
Next, I will open c:\program files (x86) using the line below
cd 'C:\Program Files (x86)\'
Now all I need to do is run the two lines below
az aks get-credentials --resource-group AKS-Cluster --name akscluster
az aks browse --resource-group AKS-Cluster --name akscluster
If all goes as planned the Web UI will open and I can create services, manage my cluster, notes, roles etc.
If I click on the cluster I can see CPU usage, Memory etc.