ingress websocket 400问题

原yaml文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: uat-zeus-merchant
namespace: hqp-uat
resourceVersion: '34077785'
spec:
ingressClassName: nginx
rules:
- host: uat-zeus-merchant.haoqipei.com
http:
paths:
- backend:
service:
name: zeus-merchant
port:
number: 7101
path: /
pathType: Prefix

修改后的yaml文件
怎加了 annotations

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
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
nginx.ingress.kubernetes.io/configuration-snippet: |
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
nginx.org/websocket-services: zeus-merchant
name: uat-zeus-merchant
namespace: hqp-uat
resourceVersion: '34077785'
spec:
ingressClassName: nginx
rules:
- host: uat-zeus-merchant.haoqipei.com
http:
paths:
- backend:
service:
name: zeus-merchant
port:
number: 7101
path: /
pathType: Prefix

本博客所有文章除特别声明外,均采用 CC BY-SA 4.0 协议 ,转载请注明出处!