charts icon indicating copy to clipboard operation
charts copied to clipboard

Traefik/reverse proxy support?

Open korridor opened this issue 1 year ago • 0 comments

I use Traefik as a reverse proxy for my Kubernetes cluster. I configured the Chatwoot service to be type ClusterIP and I created a traefik IngressRoute for the service which worked fine, but the /cable websocket endpoint didn't work. After a bit of research, I added the following middlwares to make it work:

apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: chatwoot-websocket
spec:
  headers:
    customRequestHeaders:
      Connection: keep-alive, Upgrade
      Upgrade: WebSocket
---
apiVersion: traefik.containo.us/v1alpha1
kind: Middleware
metadata:
  name: chatwoot-forward-headers
spec:
  headers:
    customRequestHeaders:
      X-Forwarded-Proto: https

Now the websocket connection works fine, but I currently have only one web pod. For now this is fine for me since I don't have a ton of users for chatwoot, but I was wondering how I can make this work with multiple web pods. As far as I understand the setup this would break the websocket connection since Traefik is distributing the requests randomly between the existing pods to distribute the load. My kubernetes cluster has multiple nodes and is behind a managed load balancer that is created by the Traefik service with type LoadBalancer.

korridor avatar May 05 '24 15:05 korridor