[英]How to set max request body size in traefik ingress controller for kubernetes?
It's very easy to set up max request body size with nginx using client_max_body_size directive.使用client_max_body_size指令使用 nginx 设置最大请求正文大小非常容易。 How can I do the same with kubernetes traefik ingress controller .
我怎样才能对 kubernetes traefik 入口 controller做同样的事情。 I know there is maxrequestbodybytes directive to do so but, I'm lost with how to set it up in yaml file describing my ingress.
我知道有maxrequestbodybytes指令可以这样做,但是我不知道如何在描述我的入口的yaml文件中设置它。
Wasn't so easy to figure this out.要弄清楚这一点并不容易。 There is a funky multiline way of specifying this config in yaml file.
在yaml文件中指定此配置有一种时髦的多行方式。 Please check option traefik.ingress.kubernetes.io/buffering to see he pipe (
|
) oprator in acction.请检查选项traefik.ingress.kubernetes.io/buffering以查看他的 pipe (
|
) 操作员的操作。
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: example
labels:
domain: example.com
deployment: production
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/frontend-entry-points: http
traefik.ingress.kubernetes.io/buffering: |
maxrequestbodybytes: 31457280
memrequestbodybytes: 62914560
spec:
etc....
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.