使用Helm部署OpenStack后下载镜像报413 Request Entity Too Large问题
解决OpenStack通过Helm部署后网页下载镜像报413 Request Entity Too Large错误
问题描述
通过Helm Chart部署OpenStack后,在网页端下载镜像时触发413 Request Entity Too Large错误。已尝试添加nginx.ingress.kubernetes.io/proxy-body-size: "0"注解,后续追加nginx.ingress.kubernetes.io/client-body-buffer-size: "0"参数后,问题仍未解决。
当前Ingress配置片段
ingress_component.yaml
ingress: node_port: enabled: false http_port: 30080 https_port: 30443 annotations: # NOTE(portdirect): if left blank this is populated from # .deployment.cluster.class kubernetes.io/ingress.class: null nginx.ingress.kubernetes.io/proxy-body-size: "0" nginx.ingress.kubernetes.io/configuration-snippet: | more_set_headers "X-Content-Type-Options: nosniff"; more_set_headers "X-Frame-Options: deny"; more_set_headers "X-Permitted-Cross-Domain-Policies: none"; more_set_headers "Content-Security-Policy: script-src 'self'"; external_policy_local: false
ingress-kube-system.yaml
ingress: node_port: enabled: false http_port: 30080 https_port: 30443 annotations: # NOTE(portdirect): if left blank this is populated from # .deployment.cluster.class kubernetes.io/ingress.class: null nginx.ingress.kubernetes.io/proxy-body-size: "0" nginx.ingress.kubernetes.io/configuration-snippet: | more_set_headers "X-Content-Type-Options: nosniff"; more_set_headers "X-Frame-Options: deny"; more_set_headers "X-Permitted-Cross-Domain-Policies: none"; more_set_headers "Content-Security-Policy: script-src 'self'";
排查与解决方向
- 确认Ingress配置生效:查看Nginx Ingress Controller Pod日志,确认配置是否重载;进入Pod检查生成的Nginx配置文件(通常路径
/etc/nginx/nginx.conf),验证client_max_body_size是否设为无限制。 - 检查多层代理限制:如果集群前端有外部负载均衡或反向代理,同步调整这些组件的请求体大小限制参数。
- 调整Ingress注解:将
proxy-body-size改为具体大数值(如1000m),同时添加nginx.ingress.kubernetes.io/client-max-body-size: "0"注解,覆盖客户端请求体限制。 - 检查OpenStack服务配置:确认Glance服务的
glance-api.conf中max_image_size参数值,确保大于待下载镜像的大小。
内容的提问来源于stack exchange,提问作者AleksandrM
相关产品推荐
相关产品推荐

