DEV Community

Cover image for How to switch AKS clusters
Rafał Sroka
Rafał Sroka

Posted on • Updated on

How to switch AKS clusters

The following recipe shows how to quickly change the Kubernetes context using Azure CLI.

Step 1. Login to Azure with the Azure CLI

az login
Enter fullscreen mode Exit fullscreen mode

Step 2. Get the list of AKS clusters

az aks list -o table
Enter fullscreen mode Exit fullscreen mode

Step 3. Switch cluster (context)

kubectl config use-context <cluster-name>
Enter fullscreen mode Exit fullscreen mode

Top comments (0)