I'm using the Azure Container Service(AKS) to deploy an application, but I'm getting stuck on deploying a load balancer for the services. After I run kubectl create -f deploy.yaml
and then do kubectl describe service service-name
I get this warning from the deployment trying to create the load balancer for my app,
Type Reason Age From Message ---- ------ ---- ---- ------- Warning CreatingLoadBalancerFailed 8s service-controller Error creating load balancer (will retry): Error getting LB for service default/stallion: azure.BearerAuthorizer#WithAuthorization: Failed to refresh the Token for request to https://management.azure.com/subscriptions/SUBSCRIPTION/resourceGroups/RESOURCE_GROUP/providers/Microsoft.Network/loadBalancers/kubernetes?api-version=2017-03-01: StatusCode=0 -- Original Error: adal: Refresh request failed. Status Code = '401'
Is there something I have to do in the cloud shell so the deployment can authorize succesfully? I just followed the tutorial here.
Figured it out. kubectl get nodes
showed zero nodes and I realized that I put in the wrong value for the app secret. The deploy will still "succeed", but anything that has to create a resource will fail.