<p>Currently, to generate certificates with Let's encrypt have to add these annotations</p>
<pre><code>kubernetes.io/ingress.class=nginx
certmanager.k8s.io/cluster-issuer=letsencrypt-prod ### your cluster issuer name
kubernetes.io/tls-acme=&quot;true&quot;
</code></pre>
<p>Unfortunately, with a larger HA system, this is a bit pain adding manually when creating a new ingress.</p>
<p>This can be done with single command applying annotation to all ingress which also requires after work.</p>

Dipak Parmar
<p>You could use the following script to do a mass update all ingresses across all namespaces.</p>
<pre><code>for namespace in `kubectl get ns -o name | awk -F '/' '{print $2}'`
do
  for ingress in 'kubectl get ingress -o name | awk -F '/' '{print $2}'`
  do
    echo &quot;Working on $ingress in $namespace&quot;
    kubectl -n $namespace annotate ingress $ingress kubernetes.io/ingress.class=nginx
    kubectl -n $namespace annotate ingress $ingress certmanager.k8s.io/cluster-issuer=letsencrypt-prod
    kubectl -n $namespace annotate ingress $ingress kubernetes.io/tls-acme=&quot;true&quot;
  done
done
</code></pre>
