Failed to update lock: configmaps "ingress-controller-leader" is forbidden

좌충우돌·2021년 10월 20일
0

kubernetes

목록 보기
1/3

문제

...
Failed to update lock: configmaps "ingress-controller-leader" is forbidden: User "system:serviceaccount:default:nginx-ingress-ingress-nginx" cannot update resource "configmaps"...
...

  1. values.yaml을 적용하면서 현재 인그레스 버전이 업그레이드 되었음.
  2. 업그레이드 이후 위와 같은 에러가 출력됨.

해결

  • nginx 수신 컨트롤러에서 사용하는 서비스 계정에 권한이 없음.
  • 서비스 계정에 클러스터 관리자 권한을 부여해야 함.
kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --serviceaccount=default:nginx-ingress-ingress-nginx
  • nginx-ingress-ingress-nginx-controller 로그 확인.
  • 새로운 리더로 선출되었다는 로그가 출력되고 더 이상 에러 메시지가 나오지 않음.
"New leader elected" identity="nginx-ingress-ingress-nginx-controller-65c759b48c-mzntp"

ref

https://stackoverflow.com/questions/64032639/how-to-update-nginx-ingress-controller-so-that-latest-ingress-paths-are-used

profile
좌충우돌 회사생활

0개의 댓글