카테고리 없음
[k8s] ingress contains invalid paths: path /xxx(/I$)(.*) cannot be used with pathType Prefix 오류 수정
hs_seo
2025. 6. 22. 20:41
K8s 인그레스를 등록할 때 다음과 같은 오류가 발생하였습니다.
one or more objects failed to apply, reason: admission webhook "validate.nginx.ingress.kubernetes.io" denied the request: ingress contains invalid paths: path /server-scheduler(/1$)(*) cannot be used with pathType Prefix,admission webhook "validate.nginx.ingress.kubernetes.io" denied the request: ingress contains invalid paths: path /reader(/I$)(.*) cannot be used with pathType Prefix
k8s 의 버전이 업그레이드 되면서 체크가 변경된 것으로 보이며, annotaion 의 use-regex를 추가 하고, pathType을 Prefix에서 ImplementationSpecific 으로변경합니다.
ingress:
ingressClass: nginx
annotations:
nginx.ingress.kubernetes.io/use-regex: "true"
hosts:
- host: abc.com
paths:
- path: /server-scheduler(/|$)(.*)
pathType: ImplementationSpecific
tls:
- host: abc.com
반응형