gpt4 book ai didi

Nginx.ingress.kubernetes.io/proxy-body-size 不起作用

转载 作者:行者123 更新时间:2023-12-01 16:35:35 29 4
gpt4 key购买 nike

我想增加 Ingress 中每个请求的帖子正文的大小。所以我添加了

nginx.ingress.kubernetes.io/proxy-body-size: 8m

在yaml文件入口(在rancher的查看/编辑yaml文件中)但它不起作用。当我使用 kubectl 获取入口描述时,我没有看到添加的注释,但看到了新添加的映射。这是配置:

YAML 文件:

apiVersion: extensions/v1beta1
kind: Ingress
metadata:
annotations:
ingress.kubernetes.io/configuration-snippet: |-
set $test_host "testdms.test.com"
if ($host == $test_host) {
return 301 $scheme://$test_host/webui/;
}
nginx.ingress.kubernetes.io/proxy-body-size: 8m
creationTimestamp: 2018-09-11T12:19:02Z
generation: 116
name: test-dms
namespace: test-dms
resourceVersion: "95490045"
selfLink: /apis/extensions/v1beta1/namespaces/test-dms/ingresses/test-dms
uid: de7c4c1b-b5bc-11e8-84c0-005056bf6431
spec:
rules:
- host: testdms.test.com
http:
paths:
- backend:
serviceName: ingress-e5a45b0dc688c653b79d4b5942ebbe7c
servicePort: 80
path: /test
status:
loadBalancer:
ingress:
- {}
- ip: 198.100.101.171
- ip: 198.100.101.172
- ip: 198.100.101.173
- ip: 198.100.101.61

描述结果:

Annotations:
configuration-snippet: set $test_host "testdms.test.com"
if ($host == $test_host) {
return 301 $scheme://$test_host/webui/;
}
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal UPDATE 36s (x38 over 2h) nginx-ingress-controller Ingress test-dms/test-dms
Normal UPDATE 21s (x47 over 23d) nginx-ingress-controller Ingress test-dms/test-dms
Normal UPDATE <invalid> (x47 over 23d) nginx-ingress-controller Ingress test-dms/test-dms
Normal UPDATE <invalid> (x84 over 64d) nginx-ingress-controller Ingress test-dms/test-dms
Normal UPDATE <invalid> (x39 over 12d) nginx-ingress-controller Ingress test-dms/test-dms

最佳答案

您需要添加引号(例如 "8m"),如下所示:

nginx.ingress.kubernetes.io/proxy-body-size: "8m"

关于Nginx.ingress.kubernetes.io/proxy-body-size 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55347770/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com