Nginx ingress resource not working without host parameter

@csehra, Thanks for responding.

I have created ingress-controller as daemon as it will in all worker nodes - and also helping me in connecting with worker IP directly without LB.

Issue here is - if I apply ingress route in default namespace and my pod and svc is in different namespace i am not able to access the app using ingress. ( I also created a svc with ExternalName type in default namespace to connect with kubernetes-dashboard pod/svc

Below is the describe for ingress:

dockeras@ubuntu3:~$ kubectl describe ing nginx-ingress
Warning: extensions/v1beta1 Ingress is deprecated in v1.14+, unavailable in v1.22+; use networking.k8s.io/v1 Ingress
Name:             nginx-ingress
Namespace:        default
Address:          192.168.1.31,192.168.1.32
Default backend:  default-http-backend:80 (<error: endpoints "default-http-backend" not found>)
Rules:
  Host        Path  Backends
  ----        ----  --------
  *
              /nginx       nginx-deploy-main:80   )
              /foo         kubernetes-dashboard:443 (<error: endpoints "kubernetes-dashboard" not found>)
              /dashboard   kdash-in-ns:443 (<error: endpoints "kdash-in-ns" not found>)
Annotations:  kubernetes.io/ingress.class: nginx
              nginx.ingress.kubernetes.io/rewrite-target: /$2
Events:
  Type    Reason  Age    From                      Message
  ----    ------  ----   ----                      -------
  Normal  CREATE  4m40s  nginx-ingress-controller  Ingress default/nginx-ingress

ExternalName type svc :

kind: Service
apiVersion: v1
metadata:
  name: kdash-in-ns
  namespace: default
spec:
  type: ExternalName
  externalName: kubernetes-dashboard.kubernetes-dashboard.svc.cluster.local
  ports:
  - name: https
    port: 443

The above didn’t help.

I have created separate query also - Kubernetes: Route Kubernetes dashboard through Ingress with out host and without proxy