<p>Attaching the desctiption below. I need to host the app in 192.168.5.91 which is the master ip of the kubetnet cluster. All these are running in private space. It can be accesed throgh localhost:30239. But i need to acces it via 192.168.5.51 (master.example.com) -added in /etc/hosts</p>
<pre><code>     $kubectl describe service -n ingress-nginx  ingress-nginx
Name:              ingress-nginx-controller
Namespace:         ingress-nginx
Labels:            app.kubernetes.io/component=controller
                   app.kubernetes.io/instance=ingress-nginx
                   app.kubernetes.io/managed-by=Helm
                   app.kubernetes.io/name=ingress-nginx
                   app.kubernetes.io/version=0.46.0
                   helm.sh/chart=ingress-nginx-3.30.0
Annotations:       service.beta.kubernetes.io/do-loadbalancer-enable-proxy-protocol: true
                   service.beta.kubernetes.io/do-loadbalancer-hostname: master-kmrl.example.com
Selector:          app.kubernetes.io/component=controller,app.kubernetes.io/instance=ingress-nginx,app.kubernetes.io/name=metrodash-ingress
Type:              ClusterIP
IP Family Policy:  SingleStack
IP Families:       IPv4
IP:                10.98.115.20
IPs:               10.98.115.20
External IPs:      192.168.9.51
Port:              http  80/TCP
TargetPort:        http/TCP
Endpoints:         &lt;none&gt;
Port:              https  443/TCP
TargetPort:        https/TCP
Endpoints:         &lt;none&gt;
Session Affinity:  None
Events:            &lt;none&gt;

Name:              ingress-nginx-controller-admission
Namespace:         ingress-nginx
Labels:            app.kubernetes.io/component=controller
                   app.kubernetes.io/instance=ingress-nginx
                   app.kubernetes.io/managed-by=Helm
                   app.kubernetes.io/name=ingress-nginx
                   app.kubernetes.io/version=0.46.0
                   helm.sh/chart=ingress-nginx-3.30.0
Annotations:       &lt;none&gt;
Selector:          app.kubernetes.io/component=controller,app.kubernetes.io/instance=ingress-nginx,app.kubernetes.io/name=ingress-nginx
Type:              ClusterIP
IP Family Policy:  SingleStack
IP Families:       IPv4
IP:                10.101.116.78
IPs:               10.101.116.78
Port:              https-webhook  443/TCP
TargetPort:        webhook/TCP
Endpoints:         192.168.79.191:8443
Session Affinity:  None
Events:            &lt;none&gt;
</code></pre>
<p>The service files attached here</p>
<pre><code> $kubectl get service --all-namespaces
NAMESPACE              NAME                                 TYPE           CLUSTER-IP       EXTERNAL-IP    PORT(S)                      AGE
cert-manager           cert-manager                         ClusterIP      10.97.7.155      &lt;none&gt;         9402/TCP                     2d1h
cert-manager           cert-manager-webhook                 ClusterIP      10.102.27.254    &lt;none&gt;         443/TCP                      2d1h
default                kubernetes                           ClusterIP      10.96.0.1        &lt;none&gt;         443/TCP                      10d
ingress-nginx          ingress-nginx-controller             LoadBalancer   10.104.163.193   192.168.9.51   80:31152/TCP,443:31291/TCP   7m24s
ingress-nginx          ingress-nginx-controller-admission   ClusterIP      10.101.116.78    &lt;none&gt;         443/TCP                      8d
ingress-nginx          metrodash-service                    NodePort       10.107.176.33    &lt;none&gt;         80:30239/TCP                 13m
kube-system            calico-etcd                          ClusterIP      10.96.232.136    &lt;none&gt;         6666/TCP                     10d
kube-system            kube-dns                             ClusterIP      10.96.0.10       &lt;none&gt;         53/UDP,53/TCP,9153/TCP       10d
kubernetes-dashboard   dashboard-metrics-scraper            ClusterIP      10.109.44.9      &lt;none&gt;         8000/TCP                     9d
kubernetes-dashboard   kubernetes-dashboard                 ClusterIP      10.102.146.7     &lt;none&gt;         443/TCP                      9d
</code></pre>
<p>The ingress config</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: metrodash-ingress
  namespace: ingress-nginx
  annotations:
    nginx.ingress.kubernetes.io/proxy-send-timeout: '200'
    nginx.ingress.kubernetes.io/proxy-read-timeout: '200'
    nginx.ingress.kubernetes.io/proxy-connect-timeout: '200'
    # cert-manager.io/cluster-issuer: lets-encrypt-stag
spec:
  ingressClassName: nginx
  rules:
    - host: master.example.com
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: metrodash-service
                port:
                  number: 8000
</code></pre>
<p>Deployment config:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: metrodash-app
  namespace: ingress-nginx
  labels:
    app: metrodash
spec:
    replicas: 2
    selector:
      matchLabels:
         app: metrodash
    template:
      metadata:
        labels:
          app: metrodash
      spec:
        containers:
          - image: metrodash:latest
            name: metrodash
            imagePullPolicy: IfNotPresent
            envFrom:
            - secretRef:
                name: metrodash-secret
            - configMapRef:
                name: metrodash-config
            ports:
              - containerPort: 8000
                name: gunicorn
</code></pre>
<p>config map:</p>
<pre><code>apiVersion: v1
kind: ConfigMap
metadata:
  name: metrodash-config
  namespace: ingress-nginx
data:
  DJANGO_ALLOWED_HOSTS: &quot;*&quot;
  STATIC_ENDPOINT_URL: &quot;metrodash.com&quot;
  STATIC_BUCKET_NAME: &quot;metrodashbucket&quot;
  DJANGO_LOGLEVEL: &quot;info&quot;
  DEBUG: &quot;True&quot;
  DATABASE_ENGINE: &quot;postgresql_psycopg2&quot;
</code></pre>
<p>Ingress described:</p>
<pre><code>kubectl describe ingress -n ingress-nginx metrodash-ingress
Name:             metrodash-ingress
Namespace:        ingress-nginx
Address:          192.168.9.51
Default backend:  default-http-backend:80 (&lt;error: endpoints &quot;default-http-backend&quot; not found&gt;)
Rules:
  Host                     Path  Backends
  ----                     ----  --------
  master.example.com  
                           /   metrodash-service:8000 (192.168.79.134:8000,192.168.79.135:8000)
Annotations:               nginx.ingress.kubernetes.io/proxy-connect-timeout: 200
                           nginx.ingress.kubernetes.io/proxy-read-timeout: 200
                           nginx.ingress.kubernetes.io/proxy-send-timeout: 200
Events:                    &lt;none&gt;
</code></pre>
<p>Single node:</p>
<pre><code> kubectl get nodes
NAME          STATUS   ROLES                  AGE   VERSION
master   Ready    control-plane,master   10d   v1.21.0
</code></pre>

Sajanraj
<p>check the ingress nginx controller and add host por as in the below format.
$ kubectl get pod -n kube-system   ingress-nginx-controller-789d9c4dc-5wnc2 -oyaml</p>
<pre><code>[...]
ports:
- containerPort: 80
  hostPort: 80
  name: http
  protocol: TCP
- containerPort: 443
  hostPort: 443
  name: https
  protocol: TCP
- containerPort: 8443
  name: webhook
  protocol: TCP
[...]
</code></pre>
<p>To get the access via host ip , remove host FQDN name from the ingress config, leave empty or remove it.</p>
<pre><code>apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: metrodash-ingress
  namespace: ingress-nginx
  annotations:
    nginx.ingress.kubernetes.io/proxy-send-timeout: '200'
    nginx.ingress.kubernetes.io/proxy-read-timeout: '200'
    nginx.ingress.kubernetes.io/proxy-connect-timeout: '200'
    # cert-manager.io/cluster-issuer: lets-encrypt-stag
spec:
  ingressClassName: nginx
  rules:
    - host: 
      http:
        paths:
          - path: /
            pathType: Prefix
            backend:
              service:
                name: metrodash-service
                port:
                  number: 8000
</code></pre>
