我正在按照教程在https://docs.microsoft.com/en-us/azure/aks/tutorial-kubernetes-deploy-application上的Azure AKS上运行容器化应用程序,但我的部署很难为我的服务创建负载均衡器:
Normal EnsuringLoadBalancer 3m (x12 over 33m) service-controller
Ensuring load balancer
Warning CreatingLoadBalancerFailed 3m (x12 over 33m) service-controller
Error creating load balancer (will retry): Failed to ensure load balancer f
for service default/azure-vote-front: azure.BearerAuthorize
#WithAuthorization: Failed to refresh the Token for request to
https://management.azure.com/subscriptions/xxxxxxxxxxxxxxxxxxxxxxxxxxxx/
resourceGroups/xxxxxxxxxxxxxxxxxxxxxxxxxxxx/providers/Microsoft.Network/load
Balancers/kubernetes-internal?api-version=2017-03-01: StatusCode=0 --
Original Error: adal: Refresh request failed. Status Code = '401'
当运行kubectl get service myservice --watch时,外部ip只会处于暂挂状态。 可能是什么原因造成的?
答案 0 :(得分:2)
您使用缺少为群集创建\ manage资源的权限的服务主体创建了AKS群集。您需要使用适当的服务主体重新创建集群(比修复更容易)。