繁体   English   中英

Nginx Kube.netes 集群上的入口

[英]Nginx Ingress on Kubernetes Cluster

`我有一个工作入口 controller 版本 1.0.0 (Bitnami)。 它在一个晴朗的早晨停止工作,看来错误是由于版本被贬低造成的。 现在我尝试升级这个版本,但开始出现错误。 我删除了入口并再次重新安装,这次是从拉取最新图像的 Bitnami 存储库。 它正在抛出错误。 我创建了一个新的 AKS 集群并从同一个存储库在其上安装了 ingress,它似乎运行良好。 有人可以帮我了解如何解决这个问题吗? 我在这个集群上运行了 120 多个服务,重新开始将意味着大量的精力和时间。

 E0419 10:57:29.245933 1 queue.go:130] "requeuing" err="\n-------------------------------------------------------------------------------\nError: exit status 1\n2022/04/19 10:57:29 [warn] 25#25: the \"http2_max_field_size\" directive is obsolete, use the \"large_client_header_buffers\" directive instead in /tmp/nginx-cfg2573211911:143\nnginx: [warn] the \"http2_max_field_size\" directive is obsolete, use the \"large_client_header_buffers\" directive instead in /tmp/nginx-cfg2573211911:143\n2022/04/19 10:57:29 [warn] 25#25: the \"http2_max_header_size\" directive is obsolete, use the \"large_client_header_buffers\" directive instead in /tmp/nginx-cfg2573211911:144\nnginx: [warn] the \"http2_max_header_size\" directive is obsolete, use the \"large_client_header_buffers\" directive instead in /tmp/nginx-cfg2573211911:144\n2022/04/19 10:57:29 [warn] 25#25: the \"http2_max_requests\" directive is obsolete, use the \"keepalive_requests\" directive instead in /tmp/nginx-cfg2573211911:145\nnginx: [warn] the \"http2_max_requests\" directive is obsolete, use the \"keepalive_requests\" directive instead in /tmp/nginx-cfg2573211911:145\n2022/04/19 10:57:29 [emerg] 25#25: \"location\" directive is not allowed here in /tmp/nginx-cfg2573211911:783\nnginx: [emerg] \"location\" directive is not allowed here in /tmp/nginx-cfg2573211911:783\nnginx: configuration file /tmp/nginx-cfg2573211911 test failed\n\n-------------------------------------------------------------------------------\n" key="initial-sync" I0419 10:57:29.246021 1 event.go:282] Event(v1.ObjectReference{Kind:"Pod", Namespace:"nginx-ingress", Name:"nginx-nginx-ingress-controller-5575846679-bjwkp", UID:"9e5641ae-345c-4d3c-a840-83c143f07fd3", APIVersion:"v1", ResourceVersion:"5932936", FieldPath:""}): type: 'Warning' reason: 'RELOAD' Error reloading NGINX: ------------------------------------------------------------------------------- Error: exit status 1 2022/04/19 10:57:29 [warn] 25#25: the "http2_max_field_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /tmp/nginx-cfg2573211911:143 nginx: [warn] the "http2_max_field_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /tmp/nginx-cfg2573211911:143 2022/04/19 10:57:29 [warn] 25#25: the "http2_max_header_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /tmp/nginx-cfg2573211911:144 nginx: [warn] the "http2_max_header_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /tmp/nginx-cfg2573211911:144 2022/04/19 10:57:29 [warn] 25#25: the "http2_max_requests" directive is obsolete, use the "keepalive_requests" directive instead in /tmp/nginx-cfg2573211911:145 nginx: [warn] the "http2_max_requests" directive is obsolete, use the "keepalive_requests" directive instead in /tmp/nginx-cfg2573211911:145 2022/04/19 10:57:29 [emerg] 25#25: "location" directive is not allowed here in /tmp/nginx-cfg2573211911:783 nginx: [emerg] "location" directive is not allowed here in /tmp/nginx-cfg2573211911:783 nginx: configuration file /tmp/nginx-cfg2573211911 test failed

事实证明问题出在入口 class 名称“nginx”上。 我重新部署了入口 controller,这次使用值文件和入口类名称作为 dev-nginx,这似乎可以解决问题。 然后我不得不删除现有的 ingressClass 并重新部署 ingress 来解决这个问题。

 E0421 07:40:56.183407 7 main.go:122] Unexpected error searching IngressClass: ingressclasses.networking.k8s.io "nginx" is forbidden: User "system:serviceaccount:default:ingress-nginx" cannot get resource "ingressclasses" in API group .networking.k8s.io" at the cluster scope W0421 07:40:56.183431 7 main.go:125] No IngressClass resource with name nginx found. Only annotation will be us

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM