A different object named already exists in your kubeconfig file

COMMAND
az aks get-credentials --resource-group <rg-name> --name <aks-cluster-name>

ERROR
A different object named <aks-cluster-name> already exists in your kubeconfig file.

SOLUTION

Add the --overwrite-existing flag to the command as presented in the example bellow:

az aks get-credentials --resource-group <rg-name> --name <aks-cluster-name> --overwrite-existing

After that you will be able to use the get-credentials command without any prompt. Very useful when you are automating routines.

Learn how to create automated routines and scripts.

Check more Azure and AKS articles.

Deixe um comentĂ¡rio

O seu endereço de e-mail nĂ£o serĂ¡ publicado. Campos obrigatĂ³rios sĂ£o marcados com *