<p>I'm struggling with a very basic example of an Ingress service fronting an nginx pod.  When ever I try to visit my example site I get this simple text output instead of the default nginx page:</p>
<pre><code>404 page not found
</code></pre>
<p>Here is the deployment I'm working with:</p>
<pre><code>apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx-deployment
  labels:
    app: nginx
spec:
  replicas: 4
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx
        ports:
        - containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
  name: nginx-service
spec:
  selector:
    app: nginx
  ports:
    - protocol: TCP
      port: 80
      targetPort: 8080
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: nginx-ingress
  namespace: default
spec:
  rules:
  - host: argo.corbe.net
    http:
      paths:
      - backend:
          serviceName: ningx
          servicePort: 80
</code></pre>
<p>k3s kubectl get pods -o wide:</p>
<pre><code>NAME                              READY   STATUS    RESTARTS   AGE   IP           NODE    NOMINATED NODE   READINESS GATES
nginx-deployment-d6dcb985-942cz   1/1     Running   0          8h    10.42.0.17   k3s-1   &lt;none&gt;           &lt;none&gt;
nginx-deployment-d6dcb985-d7v69   1/1     Running   0          8h    10.42.0.18   k3s-1   &lt;none&gt;           &lt;none&gt;
nginx-deployment-d6dcb985-dqbn9   1/1     Running   0          8h    10.42.1.26   k3s-2   &lt;none&gt;           &lt;none&gt;
nginx-deployment-d6dcb985-vpf79   1/1     Running   0          8h    10.42.1.25   k3s-2   &lt;none&gt;           &lt;none&gt;
</code></pre>
<p>k3s kubectl -o wide get services:</p>
<pre><code>NAME            TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)   AGE   SELECTOR
kubernetes      ClusterIP   10.43.0.1       &lt;none&gt;        443/TCP   5d    &lt;none&gt;
nginx-service   ClusterIP   10.43.218.234   &lt;none&gt;        80/TCP    8h    app=nginx
</code></pre>
<p>k3s kubectl -o wide get ingress:</p>
<pre><code>NAME            CLASS    HOSTS            ADDRESS          PORTS   AGE
nginx-ingress   &lt;none&gt;   argo.corbe.net   207.148.25.119   80      8h
</code></pre>
<p>k3s kubectl describe deployment nginx-deployment:</p>
<pre><code>Name:                   nginx-deployment
Namespace:              default
CreationTimestamp:      Mon, 22 Feb 2021 15:19:07 +0000
Labels:                 app=nginx
Annotations:            deployment.kubernetes.io/revision: 2
Selector:               app=nginx
Replicas:               4 desired | 4 updated | 4 total | 4 available | 0 unavailable
StrategyType:           RollingUpdate
MinReadySeconds:        0
RollingUpdateStrategy:  25% max unavailable, 25% max surge
Pod Template:
  Labels:  app=nginx
  Containers:
   nginx:
    Image:        nginx
    Port:         8080/TCP
    Host Port:    0/TCP
    Environment:  &lt;none&gt;
    Mounts:       &lt;none&gt;
  Volumes:        &lt;none&gt;
Conditions:
  Type           Status  Reason
  ----           ------  ------
  Available      True    MinimumReplicasAvailable
  Progressing    True    NewReplicaSetAvailable
OldReplicaSets:  &lt;none&gt;
NewReplicaSet:   nginx-deployment-7848d4b86f (4/4 replicas created)
Events:
  Type    Reason             Age    From                   Message
  ----    ------             ----   ----                   -------
  Normal  ScalingReplicaSet  2m43s  deployment-controller  Scaled up replica set nginx-deployment-7848d4b86f to 1
  Normal  ScalingReplicaSet  2m43s  deployment-controller  Scaled down replica set nginx-deployment-d6dcb985 to 3
  Normal  ScalingReplicaSet  2m43s  deployment-controller  Scaled up replica set nginx-deployment-7848d4b86f to 2
  Normal  ScalingReplicaSet  2m40s  deployment-controller  Scaled down replica set nginx-deployment-d6dcb985 to 2
  Normal  ScalingReplicaSet  2m40s  deployment-controller  Scaled up replica set nginx-deployment-7848d4b86f to 3
  Normal  ScalingReplicaSet  2m40s  deployment-controller  Scaled down replica set nginx-deployment-d6dcb985 to 1
  Normal  ScalingReplicaSet  2m40s  deployment-controller  Scaled up replica set nginx-deployment-7848d4b86f to 4
  Normal  ScalingReplicaSet  2m38s  deployment-controller  Scaled down replica set nginx-deployment-d6dcb985 to 0
</code></pre>

<p>nginx image listens for connection on port 80 by default.</p>
<pre><code>$ kubectl run --image nginx
$ kubectl exec -it nginx -- bash
root@nginx:/# apt update
    **output hidden**
root@nginx:/# apt install iproute2
    **output hidden**
root@nginx:/# ss -lunpt
Netid     State      Recv-Q     Send-Q         Local Address:Port         Peer Address:Port                                     
tcp       LISTEN     0          0                    0.0.0.0:80                0.0.0.0:*        users:((&quot;nginx&quot;,pid=1,fd=7))    
tcp       LISTEN     0          0                          *:80                      *:*        users:((&quot;nginx&quot;,pid=1,fd=8))    
</code></pre>
<p>Notice it's port 80 that is open, not port 8080.
This mean that your service is misconfigured because it forwards to port 8080.</p>
<p>You should set target port to 80 like following.:</p>
<pre><code>apiVersion: v1
kind: Service
metadata:
  name: nginx-service
spec:
  selector:
    app: nginx
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80    # &lt;- HERE
</code></pre>
<p>Also notice the service name:</p>
<pre><code>kind: Service
metadata:
  name: nginx-service
</code></pre>
<p>And as a backed you put service of a different name:</p>
<pre><code>- backend:
    serviceName: ningx
</code></pre>
<p>Change it to the actual name of a service, like below:</p>
<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: nginx-ingress
  namespace: default
spec:
  rules:
  - host: argo.corbe.net
    http:
      paths:
      - backend:
          serviceName: ningx-service
          servicePort: 80
</code></pre>
<p>Apply the changes and it should work now.</p>
