Member-only story
Nginx ingress — Error retrieving resource lock, ingress pods missing load balancer IP addresses
We have been deploying nginx ingress on our AKS clusters for a while now using deployment files. Recently we upgraded ingress deployment to use helm charts instead of individual deployment files.
With this upgrade, we encountered two issues:
- When we list down the ingress of all our apis, they are missing ip address
In addition, when we export ingress yaml, it was missing loadbalancer ip
kubectl get ingress -o yaml
2. In ingress controller logs, we are continuously seeing below error related to controller leader election
E0920 13:46:00.002032 7 leaderelection.go:330] error retrieving resource lock ingress-nginx/ingress-controller-leader: leases.coordination.k8s.io “ingress-controller-leader” is forbidden: User “system:serviceaccount:ingress-nginx:nginx-ingress-ingress-nginx” cannot get resource “leases” in API group “coordination.k8s.io” in the namespace “ingress-nginx”
The error message points us to a permission issue with service account used for ingress controller…