I create a k8s deployment script with python, and to get the configuration from kubectl
, I use the python command:
from kubernetes import client, config
config.load_kube_config()
to get the azure aks configuration I use the following az
commands:
az login
az aks get-credentials --resource-group [resource group name] --name [aks name]
is there any way to get azure aks credential only from python and without the need of the az
commands?
thanks!
In this case the solution was to use Azure Python SDK to retrieve cluster credentials directly from Azure API bypassing Az Cli.