当前位置:   article > 正文

helm部署JumpServer登陆web界面提示连接websocket失败_jumpserver helm ingress

jumpserver helm ingress

 jumpserver版本 v3.10.1 【社区版】

解决方法 ,修改ingress规则即可

  1. apiVersion: networking.k8s.io/v1
  2. kind: Ingress
  3. metadata:
  4. annotations:
  5. compute-full-forwarded-for: "true"
  6. kubernetes.io/ingress.class: nginx
  7. meta.helm.sh/release-name: jms-k8s
  8. meta.helm.sh/release-namespace: jumpserver
  9. nginx.ingress.kubernetes.io/proxy-body-size: "4096m" #这个要加,上传文件大小,不然文件都无法上传
  10. nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" #这是解决websocket附带的方法
  11. nginx.ingress.kubernetes.io/proxy-send-timeout: "3600" #这是解决websocket附带的方法
  12. nginx.ingress.kubernetes.io/server-snippets: | #加上底下这些
  13. location / {
  14. proxy_set_header Upgrade "websocket"; #最重要
  15. proxy_http_version 1.1; #最重要
  16. proxy_set_header X-Forwarded-Host $http_host;
  17. proxy_set_header X-Forwarded-Proto $scheme;
  18. proxy_set_header X-Forwarded-For $remote_addr;
  19. proxy_set_header Host $host;
  20. proxy_set_header Connection "Upgrade"; #最重要
  21. proxy_cache_bypass $http_upgrade;
  22. proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  23. }
  24. use-forwarded-headers: "true"
  25. generation: 1
  26. labels:
  27. app.kubernetes.io/instance: jms-k8s
  28. app.kubernetes.io/managed-by: Helm
  29. app.kubernetes.io/name: jumpserver
  30. app.kubernetes.io/version: v3.10.1
  31. helm.sh/chart: jumpserver-3.10.1
  32. name: jms-k8s-jumpserver-ingress
  33. namespace: jumpserver
  34. spec:
  35. rules:
  36. - host: jump.wbes.link
  37. http:
  38. paths:
  39. - backend:
  40. service:
  41. name: jms-k8s-jumpserver-jms-web
  42. port:
  43. number: 80
  44. path: /
  45. pathType: Prefix

 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家小花儿/article/detail/536846
推荐阅读
相关标签
  

闽ICP备14008679号