<p>I was Trying out kuberenets in my local with a tutorial and ran into some issues.</p>

<p>I used Docker to build images of few snippets in node js and then used it to deploy in microk8s. Everything is working perfectly without the ingress controller.
The containers are
client - port 3000 (react app)
posts - port 4000 
comments - port 4001
moderation ...</p>

<p>I applied this configuration after enabling ingress in microk8s</p>

<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
    name: ingress-srv
    annotations:
        kubernetes.io/ingress.class: nginx
        nginx.ingress.kubernetes.io/use-regex: 'true'
spec:
    rules:
        - host: posts.com
          http:
            paths:
                - path: /posts/create
                  backend: 
                    serviceName: posts-clusterip-srv
                    servicePort: 4000
                - path: /posts
                  backend: 
                    serviceName: query-clusterip-srv
                    servicePort: 4002
                - path: /posts/?(.*)/comments
                  backend: 
                    serviceName: comments-clusterip-srv
                    servicePort: 4001
                - path: /?(.*)
                  backend: 
                      serviceName: client-clusterip-srv
                      servicePort: 3000
</code></pre>

<p>I've ensured to edit the hosts file to set </p>

<pre><code>127.0.0.1    posts.com
</code></pre>

<p>When i check the k8s for ingress This is my result </p>

<p><a href="https://i.stack.imgur.com/cqdo6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/cqdo6.png" alt="Screenshot for Ingress Controller"></a></p>

<p>Please guide me on how to troubleshoot this or what's going wrong in my setup. 
It worked once and when i tried it again with skaffold,(it deploys pods without any issue, i can still access via NodePort service) Its not working when i goto posts.com in browser. please tell me what went wrong.</p>

<p>PS. When i ping posts.com its pointing to 127.0.0.1 as well</p>

Adharsh M
<p>Actually I resolved it by Restarting my PC.</p>

<p>I'm not sure how, as I've also reinstalled microk8s and tried minikube as well.
It was something associated with the OS I suppose, somehow its working after a restart.</p>
