Connecting to the Kubernetes cluster

Step 1: Get the authentication code for logging into Azure.

Az login --use-device-code

Step 2: Follow the instructions in the output to log in to Azure.

When login is successful, the following information will display.

Step 3: Configure the kubectl to connect to your Kubernetes cluster using the az aks get-credentials command. For example,

az aks get-credentials -g pscloudapp -n pscloudapp

The command downloads credentials and configures the Kubernetes command-line tool to use them.

Step 4: View the connection to your cluster using the following command.

Kubectl get nodes

The output returns a list of the cluster nodes, make sure the node status is ready.