In this blog post, we will show you how to manage an Azure AKS cluster using Azure Cloud Shell and the Azure CLI command line.
About Azure Cloud Shell
Azure Cloud Shell is a command-line utility hosted inside Microsoft Azure and has all the needed command line utilities loaded into the shell.
Cloud Shell runs inside a storage account in Azure which allows us to keep a script library inside it and use it from anywhere.
With Cloud Shell, there is no need to install the Azure CLI and keep it up to do date.
Manage AKS
To manage my AKS cluster using Cloud Shell I will start by login into the Cloud Shell using the URL Shell.azure.com.
Below you can see how Cloud Shell looks like.
To view all the AKS, Azure CLI commands I will run the command below:
Az aks --help
To view my Cluster, I will run the command below first to with the resource group name and AKS cluster name.
az aks get-credentials --resource-group AKSCluster --name AKSCluster001
Now I can use the Kubectl utility to run commands
kubectl get nodes
To view my AKS cluster configuration in a JSON config file I will run
Az AKS list
I can also see my running version
Check updates
To view the AKS master and Node version and if there are updates available, I will run the command below
az aks get-upgrades --name AKSCluster001 --resource-group AKSCluster --output table
As you can see both Master which is managed by Microsoft Azure and my Node are running the same version.