I am using kubectl
to control Kubernetes Service on Azure (scaling, getting pod status). Is it safe to call kubectl automatically in a script on production and not worry that the credentials will expire?
This is what I did once on the production server (required manual login via web page) (os is Windows Server 2016):
az login
az account set --subscription="S"
az aks get-credentials --resource-group R --name C
This is what is being run in a script/application:
kubectl get pods
Can I be sure the last call will just work from now on (and will not require manual login on a sunday night)?