ingress-nginx: MountVolume.SetUp failed for volume "webhook-cert" : secret "ingress-nginx-admission" not found
Hello,
We attempted to deploy NGINX Ingress controller version 0.44.0 yesterday. The deploy failed. Error ‘MountVolume.SetUp failed for volume “webhook-cert” : secret “ingress-nginx-admission” not found’ is reported:
[root@host ingress-nginx-deploy]# kubectl describe pod ingress-nginx-controller-747b56c56-vjzpb --namespace ingress-nginx
Name: ingress-nginx-controller-747b56c56-vjzpb
Namespace: ingress-nginx
...
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 9m16s default-scheduler Successfully assigned ingress-nginx/ingress-nginx-controller-747b56c56-vjzpb to host
Warning FailedMount 2m39s (x3 over 7m13s) kubelet, host Unable to attach or mount volumes: unmounted volumes=[webhook-cert], unattached volumes=[webhook-cert ingress-nginx-token-kmt78]: timed out waiting for the condition
Warning FailedMount 62s (x12 over 9m16s) kubelet, host MountVolume.SetUp failed for volume "webhook-cert" : secret "ingress-nginx-admission" not found
Warning FailedMount 23s kubelet, host Unable to attach or mount volumes: unmounted volumes=[webhook-cert], unattached volumes=[ingress-nginx-token-kmt78 webhook-cert]: timed out waiting for the condition
However, a secret exists:
[root@host ingress-nginx-deploy]# kubectl get secret --namespace ingress-nginx
NAME TYPE DATA AGE
default-token-6hvqw kubernetes.io/service-account-token 3 9m41s
ingress-nginx-admission-token-sv4z8 kubernetes.io/service-account-token 3 9m41s
ingress-nginx-token-kmt78 kubernetes.io/service-account-token 3 9m41s
We deployed the cluster using kubeadm. Kubernetes is at v1.18.4. The nodes and master are running CentOS 8.3 Stream. Docker version 19.03.15 is installed. The cluster reports all nodes are “Ready”. Please let me know if I can provide any additional details.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 22 (6 by maintainers)
I resolved it creating the
ingress-nginx
namespace first. If no namespace is provided, the secret will be created in the default one (in my case).