대머리개발자

ingress nginx 버전 업데이트 본문

개발이야기/오픈소스 설치

ingress nginx 버전 업데이트

대머리개발자 2025. 3. 31. 10:36
728x90

언제나 예기치 못하게..

최근 Kubernetes 환경에서 사용되는 NGINX Ingress Controller (ingress-nginx)에서 발생하는 
취약점을 해결한 보안 업데이트가 발표되어 안내드립니다.
취약점에 영향받는 버전을 사용 중인 경우 업데이트 권고 드립니다

 

관련

https://kubernetes.io/blog/2025/03/24/ingress-nginx-cve-2025-1974/

 

Ingress-nginx CVE-2025-1974: What You Need to Know

Today, the ingress-nginx maintainers have released patches for a batch of critical vulnerabilities that could make it easy for attackers to take over your Kubernetes cluster. If you are among the over 40% of Kubernetes administrators using ingress-nginx, y

kubernetes.io

 

nginx를 1.12.1로 버전업 해야 한다.

 

난 쿨가이니깐. 시원하게.. 명령어 고!( 물론 개발서버니껜 ㅋㅋ)

그냥 알멩이만 업그레이드 하니깐. 굳이..설정값들을 백업할 필요성은 못 느낌.

kubectl set image deployment/ingress-nginx-controller \
  controller=registry.k8s.io/ingress-nginx/controller:v1.12.1 \
  --namespace ingress-nginx

 

 

역시나..(1)

E0331 01:05:03.684301 6 leaderelection.go:436] error retrieving resource lock ingress-nginx/ingress-controller-leader: leases.coordination.k8s.io "ingress-controller-leader" is forbidden: User "system:serviceaccount:ingress-nginx:ingress-nginx" cannot get resource "leases" in API group "coordination.k8s.io" in the namespace "ingress-nginx"

 

오류의 해결책을 빠르게 찾는 AI 굳굳굳 진짜 AI는 구독료 이상의 값어치를 한다.

 

뭔지는 몰라도 그냥 팔로우!!

kubectl edit clusterrole ingress-nginx

맨 아래 ADD

- apiGroups:
  - coordination.k8s.io
  resources:
  - leases
  verbs:
  - get
  - list
  - watch
  - create
  - update
  - patch
  - delete

 

nginx 재기동 

kubectl rollout restart deployment ingress-nginx-controller -n ingress-nginx

 

역시나...(2)

W0331 01:15:23.884682 7 reflector.go:569] k8s.io/client-go@v0.32.3/tools/cache/reflector.go:251: failed to list *v1.EndpointSlice: endpointslices.discovery.k8s.io is forbidden: User "system:serviceaccount:ingress-nginx:ingress-nginx" cannot list resource "endpointslices" in API group "discovery.k8s.io" at the cluster scope

 

 

- apiGroups:
  - discovery.k8s.io
  resources:
  - endpointslices
  verbs:
  - list
  - watch

 

 

nginx 재기동  

 

버전 확인

kubectl get pods -n ingress-nginx -o=jsonpath='{range .items[*]}{.metadata.name}{" -> "}{.spec.containers[*].image}{"\n"}{end}'

 

 

 

운영에서는 clusterrole 미리 적용하고 진행하면 깔끔하게 끝난다!!!

 

 

 

 

 

728x90