ingress-nginx controller install fail due to "failed getting validating webhook"

2/14/2022

I just apply the yaml file to install ingress-nginx controller in my private VM.

kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.1/deploy/static/provider/baremetal/deploy.yaml

got following result, but it looks like ingress pod is working and i can access it(via node ip:port).

root@master01 ~# kubectl get pod -n ingress-nginx

NAME READY STATUS RESTARTS AGE ingress-nginx-admission-create-t7lfp 0/1 Completed 0 18s ingress-nginx-admission-patch-pghtm 0/1 CrashLoopBackOff 1 (15s ago) 18s ingress-nginx-controller-54cf4b5cfb-cj2vv 0/1 Running 0 18s root@master01 ~# kubectl get pod -n ingress-nginx -o wide

NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES ingress-nginx-admission-create-t7lfp 0/1 Completed 0 32s 10.244.0.13 master01 <none> <none> ingress-nginx-admission-patch-pghtm 0/1 Error 2 (29s ago) 32s 10.244.0.12 master01 <none> <none> ingress-nginx-controller-54cf4b5cfb-cj2vv 1/1 Running 0 32s 10.244.0.14 master01 <none> <none>

I just want to know why "ingress-nginx-admission-patch-pghtm" (patch job) always failed and any impact?

Following is logs for the pod log and pod descriptions

  1. patch job pod log

root@master01 ~# kubectl logs ingress-nginx-admission-patch-pghtm -n ingress-nginx

**{"level":"info","msg":"patching webhook configurations 'ingress-nginx-admission' mutating=false, validating=true, failurePolicy=Fail","source":"k8s/k8s.go:38","time":"2022-02-14T11:19:40Z"}**

**{"err":"the server could not find the requested resource","level":"fatal","msg":"failed getting validating webhook","source":"k8s/k8s.go:47","time":"2022-02-14T11:19:40Z"}**
  1. patch job pod description

    Name: ingress-nginx-admission-patch-pghtm Namespace: ingress-nginx Priority: 0 Node: node02.localdomain/192.168.31.205 Start Time: Sun, 13 Feb 2022 08:16:34 -0500 Labels: app.kubernetes.io/component=admission-webhook app.kubernetes.io/instance=ingress-nginx app.kubernetes.io/managed-by=Helm app.kubernetes.io/name=ingress-nginx app.kubernetes.io/version=1.1.0 controller-uid=08c316a1-6185-4ba7-9785-42564726d765 helm.sh/chart=ingress-nginx-4.0.15 job-name=ingress-nginx-admission-patch Annotations: <none> Status: Running IP: 10.244.2.11 IPs: IP: 10.244.2.11 Controlled By: Job/ingress-nginx-admission-patch Containers: patch: Container ID: docker://1e01e1f0f6a10bf9c913d0f74dfcff590b8742af3009cbfb84a132cd7407fb54 Image: jettech/kube-webhook-certgen:v1.1.0 Image ID: docker-pullable://jettech/kube-webhook-certgen@sha256:e2942b9a2ced069028e772bd500aa101a6117659f062c7b42c3b12ce54732fc7 Port: <none> Host Port: <none> Args: patch --webhook-name=ingress-nginx-admission --namespace=$(POD_NAMESPACE) --patch-mutating=false --secret-name=ingress-nginx-admission --patch-failure-policy=Fail State: Waiting Reason: CrashLoopBackOff Last State: Terminated Reason: Error Exit Code: 1 Started: Sun, 13 Feb 2022 08:18:02 -0500 Finished: Sun, 13 Feb 2022 08:18:02 -0500 Ready: False Restart Count: 4 Environment: POD_NAMESPACE: ingress-nginx (v1:metadata.namespace) Mounts: /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-22cq7 (ro) Conditions: Type Status Initialized True Ready False ContainersReady False PodScheduled True Volumes: kube-api-access-22cq7: Type: Projected (a volume that contains injected data from multiple sources) TokenExpirationSeconds: 3607 ConfigMapName: kube-root-ca.crt ConfigMapOptional: <nil> DownwardAPI: true QoS Class: BestEffort Node-Selectors: kubernetes.io/os=linux Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s node.kubernetes.io/unreachable:NoExecute op=Exists for 300s Events: Type Reason Age From Message


    Normal Scheduled 2m22s default-scheduler Successfully assigned ingress-nginx/ingress-nginx-admission-patch-pghtm to node02.localdomain Normal Pulled 54s (x5 over 2m21s) kubelet Container image "jettech/kube-webhook-certgen:v1.1.0" already present on machine Normal Created 54s (x5 over 2m21s) kubelet Created container patch Normal Started 54s (x5 over 2m21s) kubelet Started container patch Warning BackOff 30s (x10 over 2m19s) kubelet Back-off restarting failed container

anyone could help, appreciated!

-- Leon XU
ingress-nginx
kubernetes

0 Answers