github twitter linkedin telegram email
Kubernetes In Microsoft Azure
Mar 3, 2018
One minute read

The simplest method to get up and running with AKS is via the azure CLI.You can find instructions to install it here.

Once you have az setup, you can login via the az login command.After successfull authentication you are pretty much ready to create a managed kubernetes cluster(AKS) in Azure.AKS has not reached GA and is in preview now.Therefore you are limited to regions listed (here][https://github.com/Azure/AKS]

resource group

The first step is to create a resource group in any of the avialable regions.

az group create --name <name> --location <avialable location>

cluster

Now create the cluster using the following command

az aks create --name <cluster name> --resource-group <nameofRGcreatedabove> --generate-ssh-keys --node-count <number_of_nodes_in_cluster>

Azure will take some time spinning up the nodes and bootstrapping the cluster.

kubectl

Once the cluster is ready.set the kubectl context to the new cluster by using the following command.

az aks get-credentials -n <clustername> -g <resourcegroup>

Boom! Now you can communicate to the cluster using kubectl, run a kubectl get nodes to confirm.You will be greeted with an output similar to the one shown below.

NAME                        STATUS    ROLES     AGE       VERSION
aks-nodepool<x-xxxxxxxx-x>   Ready     agent     7d        v1.9.2

Back to posts