I'm getting below error whenever I'm trying to apply an ingress resource/rules yaml file:
failed calling webhook "validate.nginx.ingress.kubernetes.io": Post "https://ingress-nginx-controller-admission.ingress-nginx.svc:443/networking/v1/ingresses?timeout=10s": EOF
It seems there are multiple errors for "failed calling webhook "validate.nginx.ingress.kubernetes.io": Post "https://ingress-nginx-controller-admission.ingress-nginx.svc:443/networking/v1/ingresses?timeout=10s": Error here
Like below:
- context deadline exceeded
- x509: certificate signed by unknown authority
- Temporary Redirect
- EOF
- no endpoints available for service "ingress-nginx-controller-admission"
...and many more.
My Observations:
As soon as the the ingress resource/rules yaml is applied, the above error is shown and the Ingress Controller gets restarted as shown below:
NAME READY STATUS RESTARTS AGE
ingress-nginx-controller-5cf97b7d74-zvrr6 1/1 Running 6 30m
ingress-nginx-controller-5cf97b7d74-zvrr6 0/1 OOMKilled 6 30m
ingress-nginx-controller-5cf97b7d74-zvrr6 0/1 CrashLoopBackOff 6 30m
ingress-nginx-controller-5cf97b7d74-zvrr6 0/1 Running 7 31m
ingress-nginx-controller-5cf97b7d74-zvrr6 1/1 Running 7 32m
One possible solution could be (not sure though) mentioned here: https://stackoverflow.com/a/69289313/12241977
But not sure if it could possibly work in case of Managed Kubernetes services like AWS EKS as we don't have access to kube-api server.
Also the section "kind: ValidatingWebhookConfiguration" has below field from yaml:
clientConfig:
service:
namespace: ingress-nginx
name: ingress-nginx-controller-admission
path: /networking/v1/ingresses
So what does the "path: /networking/v1/ingresses" do & where it resides or simply where we can find this path? I checked the validation webhook using below command but, not able to get where to find the above path
kubectl describe validatingwebhookconfigurations ingress-nginx-admission
Setup Details
I installed using the Bare-metal method exposed with NodePort
Ingress Controller Version - v1.1.0
Kubernetes Cluster Version (AWS EKS): 1.21