Ingress-Nginx配置修改
Ingress-Nginx配置修改
说明文档:https://kubernetes.github.io/ingress-nginx/user-guide/nginx-configuration/configmap/
将键值对添加到config-map的data部分。例如:
data: map-hash-bucket-size: "128" ssl-protocols: SSLv2
1)我们看到yaml文件里引用configmap名为:nginx-configuration
2)修改对应namespace下该文件后apply生效。(注意这里修改是全局生效的)
kind: ConfigMap apiVersion: v1 data: client-header-buffer-size: 20m compute-full-forwarded-for: "true" forwarded-for-header: X-Forwarded-For large-client-header-buffers: 4 1024k proxy-body-size: 50m use-forwarded-headers: "true" metadata: name: nginx-ingress-controller namespace: default labels: app.kubernetes.io/name: ingress-nginx app.kubernetes.io/part-of: ingress-nginx
3)指定单个域名修改的话则在ingress的annotations下添加
apiVersion: extensions/v1beta1 kind: Ingress metadata: annotations: nginx.ingress.kubernetes.io/proxy-buffer-size: "8k" nginx.ingress.kubernetes.io/proxy-body-size: 50m nginx.ingress.kubernetes.io/proxy-connect-timeout: "600" nginx.ingress.kubernetes.io/proxy-read-timeout: "600" nginx.ingress.kubernetes.io/proxy-send-timeout: "600"
如对您有帮助,支持下呗!
微信
支付宝