Azure AKS 客户端密钥已过期 - 如何更改?

Bal*_*alo 3 azure acs kubernetes

我有一个在 Azure (AKS / ACS) 上运行的 Kubernetes 集群。我使用门户创建了集群。使用现已过期的客户端密钥自动创建了 aadClient。

有人可以告诉我如何设置我已经创建的新客户端密码吗?

目前 AKS 无法更新负载均衡器值或挂载持久存储。

谢谢你!

小智 8

可以通过命令更新 AKS 客户端凭据:

az aks update-credentials \
    --resource-group myResourceGroup \
    --name myAKSCluster \
    --reset-service-principal \
    --service-principal $SP_ID \
    --client-secret $SP_SECRET
Run Code Online (Sandbox Code Playgroud)

官方文档:https://learn.microsoft.com/en-us/azure/aks/update-credentials#update-aks-cluster-with-new-credentials