I am deploying Ambassador as API gateway on Azure platform by using kubectl and getting same pending state on LoadBalancer.
I am following this link for setting ambassador:
https://dzone.com/articles/deploying-java-apps-with-kubernetes-and-the-ambass
You should tail the logs of kube-controller-manager
pods on your cluster (if you have access to kube-system
namespace) after you create a new load balancer.
Logs regarding Azure LB provisioning are found in that pod log. That's where I've mostly found reasons for LB not provisioning.
Usually, it takes around 5 minutes to provision networking stuff in Azure. If more than 15 minutes passed it is a pretty strong indicator your k8s is not properly configured to provision resource in Azure
you need to find which service principal k8s is using and grant proper credentials.
https://serverfault.com/questions/896673/how-to-find-the-service-principal-assigned-to-a-newly-created-aks-cluster
https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/aks/kubernetes-service-principal.md