Skip to content

Instantly share code, notes, and snippets.

View acidbotmaker's full-sized avatar

Ajay M acidbotmaker

View GitHub Profile
@acidbotmaker
acidbotmaker / web-socket.yaml
Created March 9, 2021 14:30
Making websockets work with kubernetes' nginx's ingress controller
#### Points to note:
## 1. Kubernetes' nginx ingress controller and Nginx's ingress controller are different. We are using kubernete's nginx controller without any additional modification
## 2. I tested it with k3s cluster provided by civo.com
## 3. If websocket url `ws://<your-domain>` is not working try `wss://<your-domain>`
## 4. If you're using a loadbalancer provided by Azure, AWS or GCP please make sure that it is a LB 4 not LB 7, e.g., EBS classic loadbalancer and EBS network loadbalancer
## 5. If you're using Application loadbalancer then websockets won't work in your cluster and you'll receive 426 http error code
---
# Deployemnt file
apiVersion: apps/v1