解决方案
在ingress的annotations下添加相关的参数
kind: Ingress
apiVersion: extensions/v1beta1
metadata:
name: lys-router
namespace: lys-ns
annotations:
kubesphere.io/alias-name: lys-router
kubesphere.io/creator: admin
kubesphere.io/description: 控制台路由
nginx.ingress.kubernetes.io/proxy-body-size: 102400m
nginx.ingress.kubernetes.io/proxy-connect-timeout: '300'
nginx.ingress.kubernetes.io/proxy-read-timeout: '300'
nginx.ingress.kubernetes.io/proxy-send-timeout: '300'
spec:
tls:
- hosts:
- nginx.lys.com
secretName: my-crt-secret
rules:
- host: cv.sugon.tech
http:
paths:
- path: /
pathType: ImplementationSpecific
backend:
serviceName: web-main
servicePort: 80
参考文档
https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/