<p>I am running a simple pod with an image from local image registry in a minikube cluster on Windows 10. I am also running a simple nodeport service. The container is available when I try accessing it from the browser with &lt;minikube_ip&gt;:30080.</p>
<p>However, now I want to set an ingress controller because I want to set up a domain and not access it using the IP. The ingress works for something simple like a basic nginx pod, but does not work for this pod that I'm trying to use. I was previously using jwilder/nginx-proxy in docker-compose and it had some conf files that needed to be attached in the conf.d directory. However, since I am moving to Kubernetes, I thought to totally omit the conf files and the reverse proxy image.</p>
<p>Now after the hosts fie is updated, the domain is reachable via curl, the domain is also pingable, however, it simply cannot be reached on the browser.</p>
<p>pod-yaml:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    io.kompose.service: api
  name: api
spec:
  replicas: 1
  selector:
    matchLabels:
      io.kompose.service: api
  strategy:
    type: RollingUpdate
  template:
    metadata:
      labels:
        io.kompose.service: api
    spec:
      containers:
      - env:
        - name: DEV_PORT
          value: &quot;80&quot;
        image: localhost:5000/api:2.3
        imagePullPolicy: &quot;IfNotPresent&quot;
        name: api
        resources: {}
      restartPolicy: Always
      serviceAccountName: &quot;&quot;
status: {}
</code></pre>
<p>Service.yaml</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  annotations:
    kompose.cmd: C:\Users\***kompose.exe
      convert
    kompose.version: 1.21.0 (992df58d8)
  creationTimestamp: null
  labels:
    io.kompose.service: api
  name: api
spec:
  selector:
    io.kompose.service: api
  type: NodePort
  ports:
  - name: &quot;http&quot;
    port: 80
    targetPort: 80
    nodePort: 30080
</code></pre>
<p>Ingress.yaml</p>
<pre><code> apiVersion: networking.k8s.io/v1beta1 # for versions before 1.14 use extensions/v1beta1
 kind: Ingress
 metadata:
   name: tls-ingress
 spec:
   tls:
     - secretName: oaky-tls
       hosts: 
         - api.localhost
   rules:
   - host: api.localhost
     http:
       paths:
       - path: /
         backend:
           serviceName: api
           servicePort: 80
</code></pre>
<p>I have checked and the TLS secret is available, I am not understanding the issue here and would really appreciate some help.</p>

EngineJanwaar
<p>Solved:
Chrome was overlooking the etc hosts file, so I did the following:</p>
<ul>
<li>Switched to Firefox and instantly the URLs were working.</li>
<li>Added annotations to denote the class:</li>
</ul>
<blockquote>
<p>kubernetes.io/ingress.class: nginx</p>
</blockquote>
<ul>
<li>Added annotations to make sure requests are redirected to ssl</li>
</ul>
<blockquote>
<p>nginx.ingress.kubernetes.io/ssl-redirect: &quot;true&quot;</p>
</blockquote>
