<p>I'am trying to learn kubernetes and ingress. I have misunderstood something ?</p>
<p>I using proxmox with 3vm</p>
<pre><code>     kubectl get nodes
NAME    STATUS   ROLES                  AGE    VERSION
k8sm    Ready    control-plane,master   127d   v1.22.4
k8sn1   Ready    &lt;none&gt;                 127d   v1.22.4
k8sn2   Ready    &lt;none&gt;     

        127d   v1.22.4
</code></pre>
<p>I Have 2 nginx pod as a deployment.</p>
<pre><code>    kubectl get pod
NAME                        READY   STATUS    RESTARTS   AGE
curl-test                   1/1     Running   0          5d11h
frontend-86968456b9-jnbqf   1/1     Running   0          5d11h
frontend-86968456b9-tj2w9   1/1     Running   0          5d11h
</code></pre>
<p>1 service used with label</p>
<pre><code>  kubectl get svc
NAME                 TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE
kubernetes           ClusterIP   10.96.0.1       &lt;none&gt;        443/TCP   127d
my-service-ingress   ClusterIP   10.104.228.72   &lt;none&gt;        80/TCP    25h
</code></pre>
<p>svc .yaml</p>
<pre><code>    ---
apiVersion: v1
kind: Service
metadata:
  name: my-service-ingress
spec:
  selector:
    app: frontend
  ports:
  - port: 80
    targetPort: 80
</code></pre>
<p>I'm connected to the master node in ssh</p>
<pre><code> curl http://10.104.228.72
 THIS IS CONTAINER : 1
</code></pre>
<p>This is my ingress file copied from officiel kubernetes doc</p>
<pre><code> apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: test-ingress
  annotations:
    nginx.ingress.kubernetes.io/rewrite-target: /
spec:
  rules:
  - http:
      paths:
      - path: /frontend
        pathType: Prefix
        backend:
          service:
            name: my-service-ingress
            port:
              number: 80
</code></pre>
<p>Ingress ressource:</p>
<pre><code>    kubectl get ingress -o wide
NAME           CLASS    HOSTS   ADDRESS   PORTS   AGE
test-ingress   &lt;none&gt;   *                 80      39m
</code></pre>
<p>info about ingress controler</p>
<pre><code>kubectl get all -n ingress-nginx
NAME                                           READY   STATUS      RESTARTS   AGE
pod/ingress-nginx-admission-create--1-tnglj    0/1     Completed   0          24h
pod/ingress-nginx-admission-patch--1-97n79     0/1     Completed   1          24h
pod/ingress-nginx-controller-547f579dc-ssf5r   1/1     Running     0          24h

NAME                                         TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)                      AGE
service/ingress-nginx-controller             NodePort    10.100.181.85   &lt;none&gt;        80:32412/TCP,443:32016/TCP   24h
service/ingress-nginx-controller-admission   ClusterIP   10.98.29.50     &lt;none&gt;        443/TCP                      24h

NAME                                       READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/ingress-nginx-controller   1/1     1            1           24h

NAME                                                 DESIRED   CURRENT   READY   AGE
replicaset.apps/ingress-nginx-controller-547f579dc   1         1         1       24h

NAME                                       COMPLETIONS   DURATION   AGE
job.batch/ingress-nginx-admission-create   1/1           4s         24h
job.batch/ingress-nginx-admission-patch    1/1           5s         24h
</code></pre>
<p>curl test with IP nodes don't work:</p>
<pre><code>kubectl get nodes -o wide
NAME    STATUS   ROLES                  AGE    VERSION   INTERNAL-IP    EXTERNAL-IP   OS-IMAGE                       KERNEL-VERSION    CONTAINER-RUNTIME
k8sm    Ready    control-plane,master   127d   v1.22.4   192.168.1.38   &lt;none&gt;        Debian GNU/Linux 10 (buster)   4.19.0-18-amd64   docker://20.10.11
k8sn1   Ready    &lt;none&gt;                 127d   v1.22.4   192.168.1.39   &lt;none&gt;        Debian GNU/Linux 10 (buster)   4.19.0-18-amd64   docker://20.10.11
k8sn2   Ready    &lt;none&gt;                 127d   v1.22.4   192.168.1.40   &lt;none&gt;        Debian GNU/Linux 10 (buster)   4.19.0-18-amd64   docker://20.10.11
rbo@K8sM:~/elearning/kubernestes_admin_course/Zeal_Vora/Ingress$ curl http://192.168.1.39
curl: (7) Failed to connect to 192.168.1.39 port 80: Connexion refusée
</code></pre>

<p>In Ingress you have used the path <code>/frontend</code> but you are not hitting it while</p>
<p>Also, use the <code>Node Port</code> with <code>Node IP</code> you are using internal service IP.</p>
<p>Something like :</p>
<pre><code>curl http://192.168.1.39:32412/frontend
</code></pre>
