I am running docker on windows machine and trying to access the http://posts.com/posts as I get HTTP Error 404.0 - Not Found.
windows host config file has been configured correctly
127.0.0.1 posts.com
as I can browse to http://posts.com
I can also access using the port number http://posts.com:31783/posts.
I am not sure why I cannot access over port 80.
following are the logs from kubernetes
and ingress configuration
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata: 
    name: ingress-srv
    annotations: 
        kubernetes.io/ingress.class: nginx
spec:
  rules: 
    - host: posts.com
      http:
        paths:
          - path: /posts
            backend:
              serviceName: posts-clusterip-srv            
              servicePort: 4000
Deployment and Service file
apiVersion: apps/v1
kind: Deployment
metadata:
    name: posts-depl
spec:
    replicas: 1
    selector:
        matchLabels:
            app: posts
    template:
        metadata:
            labels:
                app: posts
        spec:
            containers:
                - name: posts
                  image: nishank/posts:latest
---
apiVersion: v1
kind: Service
metadata:
    name: posts-clusterip-srv
spec:
    type: ClusterIP
    selector:
        app: posts
    ports:
        - name: posts
          protocol: TCP
          port: 4000
          targetPort: 4000


 
    