Error creating load balancer
I used Azure AKS to deploy a 3 node (default) cluster in the centralus location:
az aks create \
--resource-group ${RESOURCE_GROUP} \
--name=${CLUSTER_NAME} \
--dns-name-prefix=${DNS_PREFIX} \
--kubernetes-version 1.9.6 \
--generate-ssh-keys \
--verbose
Once complete, I attempted to create a LoadBalancer k8s Service, but the external IP stayed <pending> indefinitely. Thanks to the help from @colemickens, upon further investigation, the activity log showed it was bouncing from Delete LoadBalancers to Write LoadBalancers and both reported the error:
Cannot proceed with operation because resource ...ipconfig1 used by resource ...loadBalancers/kubernetes is not in Succeeded state. Resource is in Failed state and the last operation that updated/is updating the resource is PutNicOperation.
Investigating further using https://resources.azure.com/, showed the load balancer was failing due to the NICs on each of the 3 nodes. The 3 ipconfig1 NICs on each of the nodes reported:
"provisioningState": "Failed"
Attempting to kick the NICs via a GET/PUT operation on each of the NICs transitioned them to:
"provisioningState": "Updating"
After a bit of waiting, they eventually went to:
"provisioningState": "Succeeded"
The subsequent Activity Logs showed:
Write PublicIPAddresses | Succeeded | Just now | Wed Apr 25 2018 14:29:13 GMT-0700 (PDT)
Write NetworkInterfaces | Accepted | Just now | Wed Apr 25 2018 14:29:11 GMT-0700 (PDT)
Write NetworkInterfaces | Accepted | Just now | Wed Apr 25 2018 14:29:11 GMT-0700 (PDT)
Write NetworkInterfaces | Accepted | Just now | Wed Apr 25 2018 14:29:11 GMT-0700 (PDT)
Write LoadBalancers | Succeeded | Just now | Wed Apr 25 2018 14:29:11 GMT-0700 (PDT)
Delete PublicIPAddresses | Succeeded | Just now | Wed Apr 25 2018 14:29:07 GMT-0700 (PDT)
Delete LoadBalancers | Succeeded | 1 min ago | Wed Apr 25 2018 14:28:56 GMT-0700 (PDT)
Write LoadBalancers | Failed | 9 min ago | Wed Apr 25 2018 14:21:35 GMT-0700 (PDT)
Delete LoadBalancers | Failed | 10 min ago | Wed Apr 25 2018 14:20:35 GMT-0700 (PDT)
Write LoadBalancers | Failed | 14 min ago | Wed Apr 25 2018 14:16:34 GMT-0700 (PDT)
Delete LoadBalancers | Failed | 15 min ago | Wed Apr 25 2018 14:15:35 GMT-0700 (PDT)
Write LoadBalancers | Failed | 19 min ago | Wed Apr 25 2018 14:11:34 GMT-0700 (PDT)
Delete LoadBalancers | Failed | 20 min ago | Wed Apr 25 2018 14:10:35 GMT-0700 (PDT)
Write LoadBalancers | Failed | 24 min ago | Wed Apr 25 2018 14:06:34 GMT-0700 (PDT)
Delete LoadBalancers | Failed | 25 min ago | Wed Apr 25 2018 14:05:34 GMT-0700 (PDT)
Write NetworkInterfaces | Accepted | 26 min ago | Wed Apr 25 2018 14:03:50 GMT-0700 (PDT)
Write NetworkInterfaces | Accepted | 26 min ago | Wed Apr 25 2018 14:03:46 GMT-0700 (PDT)
Write NetworkInterfaces | Accepted | 27 min ago | Wed Apr 25 2018 14:02:56 GMT-0700 (PDT)
The NICs healed after re-submitting the NIC configs. Then the load balancer resources were succeeding, and eventually the external IP addresses showed up via kubectl.
I exported all the Activity log items in CSV if you're interested. Not sure what caused the NICs to originally fail to be provisioned. Any ideas?
+1 This appears to be a new issue.
I have some services 5 day old 4/21/2018 that provisioned fine. Past couple of days-ish we see no External Ips and this message
"Error creating load balancer (will retry): failed to ensure load balancer for service default/couchy-0: timed out waiting for the condition"
Server version 1.9.6
@wilsondy @font are either of your load balancers still showing this behavior now? I've found someone on the LB team that may be able to investigate.
I think we fixed it by de-allocating some public IPs. I'm sure there's a place to find out your IP count vs quota, I just don't know where...
I hit it again with a new different cluster but ended up deleting the resource group and recreating it, which solved the problem. I have not hit it since, but I also have not tried creating any new clusters since.
I've encountered a similar issue but not during a cluster creation but during creation of a service in a namespace different from default. All of them have "pending" state:

Expecting the service using a command:
kubectl --namespace=development describe service xxx-microservice
gives me a similar error message:
Error creating load balancer (will retry): failed to ensure load balancer for service development/xxx-microservice: timed out waiting for the condition
Same problem occurs for nginx-ingress installation: helm install stable/nginx-ingress --name nginx-ingress --namespace kube-system --set rbac.create=false --set rbac.createRole=false --set rbac.createClusterRole=false
...then:
kubectl get service -l app=nginx-ingress --namespace kube-system
...will return
kubectl describe service -l app=nginx-ingress --namespace kube-system
...returns: Error creating load balancer (will retry): failed to ensure load balancer for service kube-system/nginx-ingress-controller: timed out waiting for the condition
What should I do to solve this?
I have the same problem, the Azure LB is stuck in a failed mode and Write/Delete operation are all failing with
Cannot proceed with operation because resource /subscriptions/<subID>/resourceGroups/cne2-test/providers/Microsoft.Network/networkInterfaces/kubenode3_ni_default/ipConfigurations/ipconf1 used by resource /subscriptions/<subID>/resourceGroups/cne2-test/providers/Microsoft.Network/loadBalancers/cne2-test is not in Succeeded state. Resource is in Failed state and the last operation that updated/is updating the resource is PutNicOperation.
Note that I'm not using AKS nor ACs-engine. Upstream + CloudProvider Manager
@psxvoid I have the same problem. Were you able to solve the problem?
same problem here
same problem here
Fixed the issue by changing the SKU type of the Public IP address from standard to basic.
Unfortunally I have basic SKU, but the error is still there:
Error creating load balancer (will retry): failed to ensure load balancer for service default/mssql-deployment: [ensure(default/mssql-deployment): lb(kubernetes) - failed to ensure host in pool: "network.InterfacesClient#CreateOrUpdate: Failure responding to request: StatusCode=403 -- Original Error: autorest/azure: Service returned an error. Status=403 Code=\"LinkedAuthorizationFailed\"
@carloreggiani @kblooie @chechiachang @rafaelmluz can you guys provide subscriptionID, resource group, and AKS name for me to take a look? Any yaml to share with me to repro?
I have this for many times when I test aks. Retry don't always help.

I'm also running into this issue when deploying a default ingress controller with helm. the internal ip seems to be stuck in pending for up to a day and once it populates, it is not reachable,(not a 404) but just times out.
can you guys send AKS details including subscriptionID, resourceGroup, resourceName to [email protected] so that we can take a good look?
cc: @jdogg89 @shm007g @carloreggiani @kblooie @chechiachang @rafaelmluz
@weinong Hi! my problem was resolved creating a public ip of the type basic. After that no had more problem with the load balancer.
@rafaelmluz are you using advanced networking? k8s cloudprovider should have created the IP for you...
I created a traditional cluster of the k8s.... after I created public IP and later, applied the .yaml settings.
Exactly in the step.
Em sex, 20 de jul de 2018 19:01, Weinong Wang [email protected] escreveu:
@rafaelmluz https://github.com/rafaelmluz are you using advanced networking? k8s cloudprovider should have created the IP for you...
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Azure/AKS/issues/326#issuecomment-406737896, or mute the thread https://github.com/notifications/unsubscribe-auth/AimEceRcleAD6_Ac8P-vWIF_hjEj_aIjks5uIlM5gaJpZM4TkOx0 .