Socket.io Ingress controller on Kubernetes (Can't estabilish a connection)
This one is working with one
apiVersion: extensions/v1beta1kind: Ingressmetadata: annotations: certmanager.k8s.io/cluster-issuer: core-prod kubernetes.io/ingress.class: nginx nginx.ingress.kubernetes.io/proxy-read-timeout: "1800" nginx.ingress.kubernetes.io/proxy-send-timeout: "1800" nginx.ingress.kubernetes.io/rewrite-target: / nginx.ingress.kubernetes.io/secure-backends: "true" nginx.ingress.kubernetes.io/ssl-redirect: "true" nginx.ingress.kubernetes.io/websocket-services: ws-service nginx.org/websocket-services: ws-service name: core-ingressspec: rules: - host: test.io http: paths: - backend: serviceName: ws-service servicePort: 80 tls: - hosts: - test.io secretName: core-prod
Nginx itself will upgrade the HTTP request and convert it to WebSocket. You don't have to add any annotation of the same.
Deployment
and service
, YAML
configuration looking good however try removing the annotation server-snippet
. This way traffic flow will be something like
LB > ingress (Connection upgrade) > service > pods