nginx-config.yaml不生效
来源:11-1 ingress --- 四层代理、session保持、定制配置、流量控制(上)
qq_慕丝0528892
2021-06-30
配置应用之后, nginx没有写入响应的配置, 是什么原因呢?
[root@k-master ~]# cat nginx-config.yaml
kind: ConfigMap
apiVersion: v1
metadata:
name: nginx-configuration
namespace: ingress-nginx
labels:
app: ingress-nginx
data:
proxy-body-size: "64m"
proxy-read-timeout: "180"
proxy-send-timeout: "180"
[root@k-master ~]# kubectl apply -f nginx-config.yaml
configmap/nginx-configuration configured
[root@k-master ~]# kubectl exec -n ingress-nginx -it ingress-nginx-controller-xhjh2 -- cat /etc/nginx/nginx.conf | grep 64
# Configuration checksum: 16664229562195959359
server_names_hash_bucket_size 64;
map_hash_bucket_size 64;
proxy_headers_hash_bucket_size 64;
写回答
1回答
-
先用官方给的示例测一下。另外建议直接edit它自动生成的configmap以免名字啥的错误。还可以apply时候同步看ingress-nginx的日志。另外这个是有延迟的,等几十秒再查看
0102021-07-10
相似问题