How to get kubectl config file from Azure AKS

614 Views Asked by At

I am using Azure SKD for Go but I am stuck how can I get kubeconfig file using it.

For example:

Using my local system I run following commands:

az login -u "id" -p "password" -t "tenant"

above can be replicated via azidentity package of azure-sdk-for-go

but I don't know how can I get following using azure-sdk-for-go

az aks get credentials --resource-group "rg" --name "k8s-name" --admin

0

There are 0 best solutions below