# Windows Worker - Ingress Returns 504 Gateway Time-out

**URL:** <https://discuss.kubernetes.io/t/windows-worker-ingress-returns-504-gateway-time-out/29845>\
**Category:** microk8s\
**Created:** [September 23, 2024, 7:20am UTC](https://discuss.kubernetes.io/t/windows-worker-ingress-returns-504-gateway-time-out/29845 "2024-09-23T07:20:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vguillemette](https://avatars.discourse-cdn.com/v4/letter/v/45deac/32.png) [@vguillemette](https://discuss.kubernetes.io/u/vguillemette)\
**Post date:** [September 23, 2024, 7:20am UTC](https://discuss.kubernetes.io/t/windows-worker-ingress-returns-504-gateway-time-out/29845/1 "2024-09-23T07:20:31Z")

</div>

Hello,

I followed a sequence of tutorials to set up a MicroK8s Cluster consisting of 1 Linux Control Plane and 1 Windows Worker Node :

- [https://microk8s.io/docs/getting-started](https://microk8s.io/docs/getting-started)
- [https://microk8s.io/docs/addon-portainer](https://microk8s.io/docs/addon-portainer)
- [https://microk8s.io/docs/add-a-windows-worker-node-to-microk8s](https://microk8s.io/docs/add-a-windows-worker-node-to-microk8s)

I deployed a sample application on the Linux Node and it worked very well, but on the Windows Node, I get a " 504 Gateway Time-out" response from nginx.

Here are the logs and resources that I think are relevant.

Nginx Ingress Controller Logs:

```auto
2024/09/23 06:56:57 [error] 26#26: *2868 upstream timed out (110: Operation timed out) while connecting to upstream, client: 10.0.19.30, server: diva.impact.dev.groupe.lacour, request: "GET / HTTP/1.1", upstream: "http://10.50.175.86:80/", host: "diva.impact.dev.groupe.lacour"
2024/09/23 06:57:02 [error] 26#26: *2868 upstream timed out (110: Operation timed out) while connecting to upstream, client: 10.0.19.30, server: diva.impact.dev.groupe.lacour, request: "GET / HTTP/1.1", upstream: "http://10.50.175.86:80/", host: "diva.impact.dev.groupe.lacour"
2024/09/23 06:57:07 [error] 26#26: *2868 upstream timed out (110: Operation timed out) while connecting to upstream, client: 10.0.19.30, server: diva.impact.dev.groupe.lacour, request: "GET / HTTP/1.1", upstream: "http://10.50.175.86:80/", host: "diva.impact.dev.groupe.lacour"
10.0.19.30 - - [23/Sep/2024:06:57:07 +0000] "GET / HTTP/1.1" 504 160 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0" 448 15.003 [lacour-development-impact-diva-80] [] 10.50.175.86:80, 10.50.175.86:80, 10.50.175.86:80 0, 0, 0 5.001, 5.001, 5.000 504, 504, 504 d2ea2b5178aa0080a80603235b6ca38c

```

Ingress Resource:

```auto
$ kubectl describe ingress impact-diva -n lacour-development
Name: impact-diva
Labels: io.portainer.kubernetes.ingress.owner=vguillemette
Namespace: lacour-development
Address: 127.0.0.1
Ingress Class: public
Default backend: <default>
Rules:
  Host Path Backends
  ---- ---- --------
  diva.impact.dev.groupe.lacour
                                 / impact-diva:80 (10.50.175.86:80)
Annotations: <none>
Events: <none>

```

Service Resource:

```auto
$ kubectl describe service impact-diva -n lacour-development
Name: impact-diva
Namespace: lacour-development
Labels: io.portainer.kubernetes.application.name=impact-diva
                          io.portainer.kubernetes.application.owner=vguillemette
                          io.portainer.kubernetes.application.stack=impact
Annotations: <none>
Selector: app=impact-diva
Type: ClusterIP
IP Family Policy: SingleStack
IP Families: IPv4
IP: 10.152.183.126
IPs: 10.152.183.126
Port: port-0 80/TCP
TargetPort: 80/TCP
Endpoints: 10.50.175.86:80
Session Affinity: None
Internal Traffic Policy: Cluster
Events: <none>

```

Deployment Resource:

```auto
$ kubectl describe deployment impact-diva -n lacour-development
Name: impact-diva
Namespace: lacour-development
CreationTimestamp: Fri, 20 Sep 2024 10:07:58 +0200
Labels: io.portainer.kubernetes.application.name=impact-diva
                        io.portainer.kubernetes.application.owner=vguillemette
                        io.portainer.kubernetes.application.stack=impact
Annotations: deployment.kubernetes.io/revision: 2
                        io.portainer.kubernetes.application.note:
Selector: app=impact-diva
Replicas: 1 desired | 1 updated | 1 total | 1 available | 0 unavailable
StrategyType: RollingUpdate
MinReadySeconds: 0
RollingUpdateStrategy: 100% max unavailable, 0 max surge
Pod Template:
  Labels: app=impact-diva
           io.portainer.kubernetes.application.name=impact-diva
  Containers:
   impact-diva:
    Image: docker-registry.groupe.lacour/common/impact.diva:development
    Port: <none>
    Host Port: <none>
    Limits:
      cpu: 300m
      memory: 256M
    Requests:
      cpu: 300m
      memory: 256M
    Environment:
      ASPNETCORE_ENVIRONMENT: <set to the key 'ASPNETCORE_ENVIRONMENT' of config map 'global'> Optional: false
      Databases __Application__ MySqlMonSvcs __0__ SlaveAffinity: <set to the key 'Databases __Application__ MySqlMonSvcs __0__ SlaveAffinity' of config map 'global'> Optional: false
      Databases __Application__ MySqlMonSvcs __0__ Url: <set to the key 'Databases __Application__ MySqlMonSvcs __0__ Url' of config map 'global'> Optional: false
      Databases __Application__ MySqlMonSvcs __1__ SlaveAffinity: <set to the key 'Databases __Application__ MySqlMonSvcs __1__ SlaveAffinity' of config map 'global'> Optional: false
      Databases __Application__ MySqlMonSvcs __1__ Url: <set to the key 'Databases __Application__ MySqlMonSvcs __1__ Url' of config map 'global'> Optional: false
      Databases __Attachment__ MySqlMonSvcs __0__ SlaveAffinity: <set to the key 'Databases __Attachment__ MySqlMonSvcs __0__ SlaveAffinity' of config map 'global'> Optional: false
      Databases __Attachment__ MySqlMonSvcs __0__ Url: <set to the key 'Databases __Attachment__ MySqlMonSvcs __0__ Url' of config map 'global'> Optional: false
      Databases __Attachment__ MySqlMonSvcs __1__ SlaveAffinity: <set to the key 'Databases __Attachment__ MySqlMonSvcs __1__ SlaveAffinity' of config map 'global'> Optional: false
      Databases __Attachment__ MySqlMonSvcs __1__ Url: <set to the key 'Databases __Attachment__ MySqlMonSvcs __1__ Url' of config map 'global'> Optional: false
    Mounts: <none>
  Volumes: <none>
  Node-Selectors: <none>
  Tolerations: <none>
Conditions:
  Type Status Reason
  ---- ------ ------
  Available True MinimumReplicasAvailable
  Progressing True NewReplicaSetAvailable
OldReplicaSets: impact-diva-5c94545874 (0/0 replicas created)
NewReplicaSet: impact-diva-5d5f99bfcd (1/1 replicas created)
Events: <none>

```

Pod Resource:

```auto
$ kubectl describe pod impact-diva-5d5f99bfcd-v449t -n lacour-development
Name: impact-diva-5d5f99bfcd-v449t
Namespace: lacour-development
Priority: 0
Service Account: default
Node: devsiteswinb1/10.0.1.228
Start Time: Mon, 23 Sep 2024 08:10:18 +0200
Labels: app=impact-diva
                  io.portainer.kubernetes.application.name=impact-diva
                  pod-template-hash=5d5f99bfcd
Annotations: cni.projectcalico.org/containerID: 5d93d376f54ca2edf6d8812857eb5d1210926a9f7283a294865b5f0893b4f98c
                  cni.projectcalico.org/podIP: 10.50.175.86/32
                  cni.projectcalico.org/podIPs: 10.50.175.86/32
Status: Running
IP: 10.50.175.86
IPs:
  IP: 10.50.175.86
Controlled By: ReplicaSet/impact-diva-5d5f99bfcd
Containers:
  impact-diva:
    Container ID: containerd://906d4296acf0b3b8e52073eaedf7a7511e064e3d204f84639b6cc58a4c58cd1d
    Image: docker-registry.groupe.lacour/common/impact.diva:development
    Image ID: docker-registry.groupe.lacour/common/impact.diva@sha256:d2db6aba2030f965a03d0f2deadb5a8893ea68a9efb792f7a96270748603d9a8
    Port: <none>
    Host Port: <none>
    State: Running
      Started: Mon, 23 Sep 2024 08:10:23 +0200
    Ready: True
    Restart Count: 0
    Limits:
      cpu: 300m
      memory: 256M
    Requests:
      cpu: 300m
      memory: 256M
    Environment:
      ASPNETCORE_ENVIRONMENT: <set to the key 'ASPNETCORE_ENVIRONMENT' of config map 'global'> Optional: false
      Databases __Application__ MySqlMonSvcs __0__ SlaveAffinity: <set to the key 'Databases __Application__ MySqlMonSvcs __0__ SlaveAffinity' of config map 'global'> Optional: false
      Databases __Application__ MySqlMonSvcs __0__ Url: <set to the key 'Databases __Application__ MySqlMonSvcs __0__ Url' of config map 'global'> Optional: false
      Databases __Application__ MySqlMonSvcs __1__ SlaveAffinity: <set to the key 'Databases __Application__ MySqlMonSvcs __1__ SlaveAffinity' of config map 'global'> Optional: false
      Databases __Application__ MySqlMonSvcs __1__ Url: <set to the key 'Databases __Application__ MySqlMonSvcs __1__ Url' of config map 'global'> Optional: false
      Databases __Attachment__ MySqlMonSvcs __0__ SlaveAffinity: <set to the key 'Databases __Attachment__ MySqlMonSvcs __0__ SlaveAffinity' of config map 'global'> Optional: false
      Databases __Attachment__ MySqlMonSvcs __0__ Url: <set to the key 'Databases __Attachment__ MySqlMonSvcs __0__ Url' of config map 'global'> Optional: false
      Databases __Attachment__ MySqlMonSvcs __1__ SlaveAffinity: <set to the key 'Databases __Attachment__ MySqlMonSvcs __1__ SlaveAffinity' of config map 'global'> Optional: false
      Databases __Attachment__ MySqlMonSvcs __1__ Url: <set to the key 'Databases __Attachment__ MySqlMonSvcs __1__ Url' of config map 'global'> Optional: false
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-q982v (ro)
Conditions:
  Type Status
  PodReadyToStartContainers True
  Initialized True
  Ready True
  ContainersReady True
  PodScheduled True
Volumes:
  kube-api-access-q982v:
    Type: Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds: 3607
    ConfigMapName: kube-root-ca.crt
    ConfigMapOptional: <nil>
    DownwardAPI: true
QoS Class: Guaranteed
Node-Selectors: <none>
Tolerations: node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events: <none>

```

In-Pod Console Check:

```auto
C:\>curl http://localhost -v
* Trying [::1]:80...
* Connected to localhost (::1) port 80
> GET / HTTP/1.1
> Host: localhost
> User-Agent: curl/8.4.0
> Accept: */*
> 
< HTTP/1.1 401 Access Denied
< Server: Microsoft-IIS/10.0
< WWW-Authenticate: Basic Realm="Authentification LACOUR Concept"
< X-Powered-By: ASP.NET
< Date: Mon, 23 Sep 2024 07:03:02 GMT
< Content-Length: 17
< 
403 Access Denied* Connection #0 to host localhost left intact

```

Http status code 403 is intended, as the test is unauthenticated.

Would you be so kind to help me troubleshoot this error ?

---

<div class="post-metadata">

**Author:** ![vguillemette](https://avatars.discourse-cdn.com/v4/letter/v/45deac/32.png) [@vguillemette](https://discuss.kubernetes.io/u/vguillemette)\
**Post date:** [September 25, 2024, 9:49am UTC](https://discuss.kubernetes.io/t/windows-worker-ingress-returns-504-gateway-time-out/29845/2 "2024-09-25T09:49:33Z")

</div>

Resolved: [Add a Windows worker node to MicroK8s - #42 by vguillemette](https://discuss.kubernetes.io/t/add-a-windows-worker-node-to-microk8s/13782/42)
