赞
踩
jumpserver版本 v3.10.1 【社区版】
解决方法 ,修改ingress规则即可
- apiVersion: networking.k8s.io/v1
- kind: Ingress
- metadata:
- annotations:
- compute-full-forwarded-for: "true"
- kubernetes.io/ingress.class: nginx
- meta.helm.sh/release-name: jms-k8s
- meta.helm.sh/release-namespace: jumpserver
- nginx.ingress.kubernetes.io/proxy-body-size: "4096m" #这个要加,上传文件大小,不然文件都无法上传
- nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" #这是解决websocket附带的方法
- nginx.ingress.kubernetes.io/proxy-send-timeout: "3600" #这是解决websocket附带的方法
- nginx.ingress.kubernetes.io/server-snippets: | #加上底下这些
- location / {
- proxy_set_header Upgrade "websocket"; #最重要
- proxy_http_version 1.1; #最重要
- proxy_set_header X-Forwarded-Host $http_host;
- proxy_set_header X-Forwarded-Proto $scheme;
- proxy_set_header X-Forwarded-For $remote_addr;
- proxy_set_header Host $host;
- proxy_set_header Connection "Upgrade"; #最重要
- proxy_cache_bypass $http_upgrade;
- proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
- }
- use-forwarded-headers: "true"
- generation: 1
- labels:
- app.kubernetes.io/instance: jms-k8s
- app.kubernetes.io/managed-by: Helm
- app.kubernetes.io/name: jumpserver
- app.kubernetes.io/version: v3.10.1
- helm.sh/chart: jumpserver-3.10.1
- name: jms-k8s-jumpserver-ingress
- namespace: jumpserver
- spec:
- rules:
- - host: jump.wbes.link
- http:
- paths:
- - backend:
- service:
- name: jms-k8s-jumpserver-jms-web
- port:
- number: 80
- path: /
- pathType: Prefix
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。