<p>I have set up a simple two-node Kubernetes cluster using K3S. I have deployed a very simple web app, but when I try to access the web app, I just get a &quot;Gateway Timeout&quot;. I've tried to keep the set up as simple as possible, but I can't see where I'm going wrong. I've outlined my entire setup below, from starting with two brand new Ubuntu 20.04 instances. Can anyone see where I'm going wrong?</p>
<p>This is my set up from start to finish:</p>
<p>On Master Node:</p>
<pre><code>sudo ufw allow 80
sudo ufw allow 8080
sudo ufw allow 6443
sudo ufw allow 2379
sudo ufw allow 2380
sudo ufw allow 2379:10252/tcp
sudo ufw allow 30000:32767/tcp
export http_proxy=proxy.example.com:8082
export https_proxy=proxy.example.com:8082
curl -sfL https://get.k3s.io | sh -
cat /var/lib/rancher/k3s/server/node-token
sudo cat /var/lib/rancher/k3s/server/node-token
sudo cat /etc/rancher/k3s/k3s.yaml
</code></pre>
<p>On Agent:</p>
<pre><code>sudo ufw allow 80
sudo ufw allow 8080
sudo ufw allow 6443
sudo ufw allow 2379
sudo ufw allow 2380
sudo ufw allow 2379:10252/tcp
sudo ufw allow 30000:32767/tcp
export http_proxy=proxy.example.com:8082
export https_proxy=proxy.example.com:8082
curl -sfL https://get.k3s.io | K3S_URL=https://vm1234.example.com:6443 K3S_TOKEN=K1060cf9217115ce1cb67d8450ea809b267ddc332b59c0c8ec6c6a30573f0b75eca::server:0b2be94c380be7bf4e16d94af36cac00 sh -
mkdir /etc/rancher/k3s/
sudo mkdir /etc/rancher/k3s/
sudo vim /etc/rancher/k3s/registries.yaml
sudo systemctl restart k3s-agent
</code></pre>
<p>On Local Workstation:</p>
<pre><code>kubectl --kubeconfig k3s.yaml apply -f web-test-deployment.yaml
kubectl --kubeconfig k3s.yaml apply -f web-test-service.yaml 
kubectl --kubeconfig k3s.yaml apply -f web-test-ingress.yaml 
</code></pre>
<p>List running pods:</p>
<pre><code>$ kubectl --kubeconfig k3s.yaml get po
NAME                                   READY   STATUS    RESTARTS   AGE
web-test-deployment-5594bffd47-2gpd2   1/1     Running   0          4m57s
</code></pre>
<p>Inspect running pod:</p>
<pre><code>$ kubectl --kubeconfig k3s.yaml describe pod web-test-deployment-5594bffd47-2gpd2
Name:         web-test-deployment-5594bffd47-2gpd2
Namespace:    default
Priority:     0
Node:         vm9876/10.192.110.200
Start Time:   Fri, 28 Aug 2020 12:07:01 +0100
Labels:       app=web-test
              pod-template-hash=5594bffd47
Annotations:  &lt;none&gt;
Status:       Running
IP:           10.42.1.3
IPs:
  IP:           10.42.1.3
Controlled By:  ReplicaSet/web-test-deployment-5594bffd47
Containers:
  web-test:
    Container ID:   containerd://c32d85da0642d3ccc00c61a5265280f9fcc11e8979d621690117878c89506440
    Image:          docker.example.com//web-test
    Image ID:       docker.example.com//web-test@sha256:cb568f5b6554284684815fc4ee17eb8cceb1aa90838a575fd3755b60bb7e44e7
    Port:           8080/TCP
    Host Port:      0/TCP
    State:          Running
      Started:      Fri, 28 Aug 2020 12:09:03 +0100
    Ready:          True
    Restart Count:  0
    Environment:    &lt;none&gt;
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-wkzpx (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             True 
  ContainersReady   True 
  PodScheduled      True 
Volumes:
  default-token-wkzpx:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-wkzpx
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  &lt;none&gt;
Tolerations:     node.kubernetes.io/not-ready:NoExecute for 300s
                 node.kubernetes.io/unreachable:NoExecute for 300s
Events:
  Type     Reason     Age                    From                      Message
  ----     ------     ----                   ----                      -------
  Normal   Scheduled  &lt;unknown&gt;              default-scheduler         Successfully assigned default/web-test-deployment-5594bffd47-2gpd2 to vm9876
  Normal   Pulling    3m58s (x4 over 5m17s)  kubelet, vm9876  Pulling image &quot;docker.example.com/web-test&quot;
  Normal   Pulled     3m16s                  kubelet, vm9876  Successfully pulled image &quot;docker.example.com/web-test&quot;
  Normal   Created    3m16s                  kubelet, vm9876  Created container web-test
  Normal   Started    3m16s                  kubelet, vm9876  Started container web-test
</code></pre>
<p>Show stack:</p>
<pre><code>$ kubectl --kubeconfig k3s.yaml get all
NAME                                       READY   STATUS    RESTARTS   AGE
pod/web-test-deployment-5594bffd47-2gpd2   1/1     Running   0          5m43s

NAME                       TYPE        CLUSTER-IP      EXTERNAL-IP   PORT(S)    AGE
service/kubernetes         ClusterIP   10.43.0.1       &lt;none&gt;        443/TCP    16m
service/web-test-service   ClusterIP   10.43.100.212   &lt;none&gt;        8080/TCP   5m39s

NAME                                  READY   UP-TO-DATE   AVAILABLE   AGE
deployment.apps/web-test-deployment   1/1     1            1           5m44s

NAME                                             DESIRED   CURRENT   READY   AGE
replicaset.apps/web-test-deployment-5594bffd47   1         1         1       5m45s
</code></pre>
<p>List Ingress:</p>
<pre><code>$ kubectl --kubeconfig k3s.yaml get ing
NAME       CLASS    HOSTS   ADDRESS         PORTS   AGE
web-test   &lt;none&gt;   *       10.94.230.224   80      5m55s
</code></pre>
<p>Inspect Ingress:</p>
<pre><code>$ kubectl --kubeconfig k3s.yaml describe ing web-test
Name:             web-test
Namespace:        default
Address:          10.94.230.224
Default backend:  default-http-backend:80 (&lt;error: endpoints &quot;default-http-backend&quot; not found&gt;)
Rules:
  Host        Path  Backends
  ----        ----  --------
  *           
              /   web-test-service:8080 (10.42.1.3:8080)
Annotations:  kubernetes.io/ingress.class: traefik
Events:       &lt;none&gt;
</code></pre>
<p>Inspect Service:</p>
<pre><code>kubectl --kubeconfig k3s.yaml describe svc web-test-service
Name:              web-test-service
Namespace:         default
Labels:            app=web-test
Annotations:       Selector:  app=web-test
Type:              ClusterIP
IP:                10.43.100.212
Port:              &lt;unset&gt;  8080/TCP
TargetPort:        8080/TCP
Endpoints:         10.42.1.3:8080
Session Affinity:  None
Events:            &lt;none&gt;
</code></pre>
<pre><code>$ curl http://10.94.230.224/web-test-service/

Gateway Timeout
</code></pre>
<p>These are my deployment manifests:</p>
<p>web-test-deployment.yaml:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: web-test
  name: web-test-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: web-test
  strategy: {}
  template:
    metadata:
      labels:
        app: web-test
    spec:
      containers:
      - image: docker.example.com/web-test
        imagePullPolicy: Always
        name: web-test
        ports:
        - containerPort: 8080
      restartPolicy: Always
      volumes: null
</code></pre>
<p>web-test-service.yaml:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: v1
kind: Service
metadata:
  labels:
    app: web-test
  name: web-test-service
spec:
  ports:
  - port: 8080
    targetPort: 8080
  selector:
    app: web-test
</code></pre>
<p>web-test--ingress.yaml:</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
  name: web-test
  annotations:
    kubernetes.io/ingress.class: &quot;traefik&quot;
spec:
  rules:
  - http:
      paths:
      - path: /
        backend:
          serviceName: web-test-service
          servicePort: 8080
</code></pre>
<hr />
<p>Note: I've also tried a <a href="https://stackoverflow.com/questions/63617993/ambassador-responds-with-no-healthy-upstream">similar setup</a> using Ambassador, but I'm getting similar results :-(</p>

simbro
<p>The annotation on the Ingress is missing description of the entrypoint and the host:</p>
<pre><code>apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
    name: web-test
    annotations:
        kubernetes.io/ingress.class: &quot;traefik&quot;
        traefik.ingress.kubernetes.io/router.entrypoints: http
    spec:
      rules:
        - host: webtest.example.com
          http:
            paths:
              - path: /
                pathType: Prefix
                backend:
                  service:
                    name: web-test-service
                    port:
                      number: 80
</code></pre>
