<p>I want to install nginx-controller in my Kubernetes cluster. I setup my master node at one server, and worker node at another server. I am using Ubuntu 20.04.</p>
<p>I followed the link (<a href="https://github.com/kubernetes/ingress-nginx/blob/main/deploy/static/provider/cloud/1.23/deploy.yaml" rel="nofollow noreferrer">https://github.com/kubernetes/ingress-nginx/blob/main/deploy/static/provider/cloud/1.23/deploy.yaml</a>) and use '<em>kubectl apply -f file_name.yaml</em>' to install the controller.</p>
<p>When I get the pods, it showed:</p>
<pre><code>ubuntu@masternode:~/hello_deploy$ kubectl get pod -n ingress-nginx
NAME                                        READY   STATUS              RESTARTS   AGE
ingress-nginx-admission-create-lrzll        1/1     Running             0          27s
ingress-nginx-admission-patch-x46xh         1/1     Running             0          27s
ingress-nginx-controller-7575567f98-s9968   0/1     ContainerCreating   0          27s
</code></pre>
<p>However, when I checked the pod, it showed:</p>
<pre><code>Events:
  Type     Reason       Age                  From               Message
  ----     ------       ----                 ----               -------
  Normal   Scheduled    14m                  default-scheduler  Successfully assigned ingress-nginx/ingress-nginx-controller-7575567f98-s9968 to workernode
  Warning  FailedMount  109s (x14 over 14m)  kubelet            MountVolume.SetUp failed for volume &quot;webhook-cert&quot; : secret &quot;ingress-nginx-admission&quot; not found
  Warning  FailedMount  45s (x6 over 12m)    kubelet            Unable to attach or mount volumes: unmounted volumes=[webhook-cert], unattached volumes=[webhook-cert kube-api-access-n2xrb]: timed out waiting for the condition
</code></pre>
<p>There is another error message I saw also:</p>
<pre><code>Unable to attach or mount volumes: unmounted volumes=[webhook-cert], unattached volumes=[webhook-cert kube-api-access-n2xrb]: timed out waiting for the condition
</code></pre>
<p>Can anyone tell me what is the reason for this to happen? Any method/ setting to solve these problems?</p>
<p>Thanks.</p>

maantarng
<p>I handled it by creating a copy from ingress-nginx-admission-token-xxxxxx secret with the new name:<code>ingress-nginx-admission</code> and then delete controller pod to recreate it.</p>
<p>steps:</p>
<ol>
<li><code>kubectl edit secret ingress-nginx-admission-token-xxxxx -n ingress-nginx</code></li>
<li>Change name attribute to <code>ingress-nginx-admission</code></li>
<li>Saving it, then it save the new yml file in your /tmp dir</li>
<li>Apply new secret with <code>kubectl apply -f /tmp/&lt;yml-file&gt;</code></li>
<li>Delete controller pod to recreate it</li>
</ol>
