Ingress
https://github.com/nginxinc/kubernetes-ingress/tree/master/examples/websocket
Demo
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| kind: Ingress apiVersion: extensions/v1beta1 metadata: name: test-renter-mobile.zhaohongye.com annotations: nginx.org/websocket-services: "izu-dz-renter-mobile-web-used-car-wss,izu-dz-renter-mobile-web-wss" spec: tls: - hosts: - test-renter-mobile.zhaohongye.com secretName: izuche-2022-https rules: - host: test-renter-mobile.zhaohongye.com http: paths: - path: / pathType: ImplementationSpecific backend: serviceName: izu-dz-renter-mobile-web servicePort: 80 - path: /renter_mobile_wss pathType: ImplementationSpecific backend: serviceName: izu-dz-renter-mobile-web-wss servicePort: 80 - path: /renter_mobile_used_car_wss pathType: ImplementationSpecific backend: serviceName: izu-dz-renter-mobile-web-used-car-wss servicePort: 80 status: loadBalancer: {}
|