Chainlit / chainlit

Build Conversational AI in minutes ⚡️
https://docs.chainlit.io
Apache License 2.0
6.76k stars 878 forks source link

Getting "Could not reach the server" when exposing a Chainlit app on Kubernetes via Gateway or Ingress Controller #384

Closed paolosalvatori closed 11 months ago

paolosalvatori commented 1 year ago

I created an application with Chainlit that works as expected when running locally, even in a Docker container. When I deploy the application to Azure Kubernetes Service, and I expose the service with a gateway or an ingress, I see the following error:

Could not reach the server.

However, if I create a port-forward to the service or one of the pods, the application works as expected. May the issue be due to the actual DNS used by the application? I can share the code, but again, the application works locally, in a container, and even in Azure Kubernetes Service, if I port-forward the service or the individual pod. Thoughts? I'm stuck.

You can find the code of the application here.

willydouhard commented 12 months ago

This is probably caused by a websocket configuration issue on your infra. Can you confirm @paolosalvatori ?

paolosalvatori commented 11 months ago

I will try to deploy the app using the NGINX Ingress Controller as a repro and then close the issue.