Member-only story

Nginx ingress — Error retrieving resource lock, ingress pods missing load balancer IP addresses

Dipesh Shah
2 min readSep 20, 2022

--

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:

  1. 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…

--

--

Dipesh Shah
Dipesh Shah

Written by Dipesh Shah

Enterprise Cloud Solution Architect, DevOps Lead, Learner

No responses yet