<p>I have an Ingress setup and initially I used a placeholder name, &quot;thesis.info&quot;. Now I would like change this hostname but whenever I to change it I just end up getting 404 errors.</p>
<ol>
<li>Change the spec.tls.rules.host value in the yaml to the new hostname</li>
<li>Change CN value which openssl uses for the crt and key that are generated for TLS</li>
<li>Edit the value /etc/hosts value on my local machine</li>
</ol>
<p>Is there a step I am missing that could be causing a problem. I am baffled by why it works with one value but not the other.</p>
<p>Below is the ingress yaml</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: frontend-ingress
  namespace: thesis
  annotations:
    kubernetes.io/ingress.class: &quot;nginx&quot;
    nginx.ingress.kubernetes.io/add-base-url: &quot;true&quot;
    nginx.ingress.kubernetes.io/service-upstream: &quot;true&quot;
    nginx.ingress.kubernetes.io/ssl-redirect: &quot;false&quot;
spec:
  tls:
    - hosts:
        - thesis
      secretName: ingress-tls
  rules:
    - host: pod1out.ie
      http:
        paths:
        - path: /
          pathType: Prefix
          backend:
            service:
              name: frontend
              port:
                number: 3000
---
</code></pre>

EoinHanan
<p>Most likely, you can find a hint on what is going on in the nginx logs. If you have access, you can access the logs using something like this:</p>
<pre><code>kubectl -n &lt;ingress-namespace&gt; get pods 
# should be one or more nginx pods
kubectl -n &lt;ingress-namespace&gt; logs &lt;nginx-pod&gt;
</code></pre>
<p>Not sure if this is the only issue, but according to the documentation, the host in 'tls' has to match explicitly the host in the rules:</p>
<pre><code>spec:
  tls:
    - hosts:
        - pod1out.ie
      secretName: ingress-tls
  rules:
    - host: pod1out.ie
</code></pre>
<p>Before struggling with tls, I would recommend making the http route itself work (eg. by creating another ingress resource), and if this works with the host you want, go for tls.</p>
