英文:
Getting error while apply ingress resource: zone is too small
问题
我是Kubernetes的新手。我已经创建了一个简单的集群,其中包括1个主节点和1个工作节点(分别在2个不同的虚拟机上运行)。此外,还在一个单独的虚拟机上设置了HA代理。
客户端版本:v1.24.0
Kustomize版本:v4.5.4
服务器版本:v1.26.1
我使用清单设置了NGINX Ingress控制器(https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-manifests/)。当我尝试应用带有规则的Ingress资源时,我遇到了错误:
添加或更新了default/i1的配置;但未应用:重新加载NGINX时出错,错误为default/i1:nginx重新加载失败:命令/usr/sbin/nginx -s reload -e stderr stdout: "" stderr: "2023/02/06 12:49:28 [emerg] 30#30: zone \"default-i1-sim.daniyar.uk-first-web-app-service-80\"在/etc/nginx/conf.d/default-i1.conf:4中太小\n"完成时出现错误:退出状态1
我的Ingress资源:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: i1
spec:
rules:
- host: sim.daniyar.uk
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: first-web-app-service
port:
number: 80
IngressClass yaml:
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
name: nginx
annotations:
ingressclass.kubernetes.io/is-default-class: "true"
spec:
controller: nginx.org/ingress-controller
如果需要更多信息,请告诉我。
谢谢
英文:
I am new to Kubernetes. I have create simple cluster with 1 master and 1 worker nodes(both running in 2 different VMs). Additionally there is HA proxy setup in a separate VM.
Client Version: v1.24.0
Kustomize Version: v4.5.4
Server Version: v1.26.1
I have setup NGINX ingress controller using manifests(https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-manifests/).
When I try to apply ingress resource with rules I am getting the error:
Configuration for default/i1 was added or updated ; but was not applied: error reloading NGINX for default/i1: nginx reload failed: command /usr/sbin/nginx -s reload -e stderr stdout: "" stderr: "2023/02/06 12:49:28 [emerg] 30#30: zone \"default-i1-sim.daniyar.uk-first-web-app-service-80\" is too small in /etc/nginx/conf.d/default-i1.conf:4\n" finished with error: exit status 1
My ingress resource:
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: i1
spec:
rules:
- host: sim.daniyar.uk
http:
paths:
- pathType: Prefix
path: /
backend:
service:
name: first-web-app-service
port:
number: 80
IngressClass yaml:
apiVersion: networking.k8s.io/v1
kind: IngressClass
metadata:
name: nginx
annotations:
ingressclass.kubernetes.io/is-default-class: "true"
spec:
controller: nginx.org/ingress-controller
Let me know if you need more info
Thanks
答案1
得分: 1
找到解决方案。
在我的情况下,我必须通过在我的Ingress资源文件中使用注释来禁用NGINX配置中的区域:
nginx.org/upstream-zone-size: "0"
英文:
Found a solution.
In my case I had to disable zones in NGINX config by using annotation:
nginx.org/upstream-zone-size: "0"
in my ingress resource file.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论