首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在多命名空间集群AKS中使用入口

在多命名空间集群AKS中使用入口
EN

Stack Overflow用户
提问于 2022-02-11 09:25:40
回答 1查看 1.3K关注 0票数 1

我有一个集群,我为不同的团队创建了名称空间。然后,我尝试使用这个命令kubectl apply -f ing2_dev_plat.yaml -n namespace_name将一个入口应用到一个命名空间。

之后,引发此错误。如何在多个名称空间中正确配置入口控制器的工作?

Nginx入口contoller服务是默认命名空间。

代码语言:javascript
复制
Error from server (BadRequest): error when creating "ing2_dev_plat.yaml": admission webhook "validate.nginx.ingress.kubernetes.io" denied the request:
-------------------------------------------------------------------------------
Error: exit status 1
2022/02/11 09:17:49 [warn] 3250#3250: the "http2_max_field_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /tmp/nginx-cfg1414424955:143
nginx: [warn] the "http2_max_field_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /tmp/nginx-cfg1414424955:143
2022/02/11 09:17:49 [warn] 3250#3250: the "http2_max_header_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /tmp/nginx-cfg1414424955:144
nginx: [warn] the "http2_max_header_size" directive is obsolete, use the "large_client_header_buffers" directive instead in /tmp/nginx-cfg1414424955:144
2022/02/11 09:17:49 [warn] 3250#3250: the "http2_max_requests" directive is obsolete, use the "keepalive_requests" directive instead in /tmp/nginx-cfg1414424955:145
nginx: [warn] the "http2_max_requests" directive is obsolete, use the "keepalive_requests" directive instead in /tmp/nginx-cfg1414424955:145
2022/02/11 09:17:49 [emerg] 3250#3250: duplicate location "/" in /tmp/nginx-cfg1414424955:1045
nginx: [emerg] duplicate location "/" in /tmp/nginx-cfg1414424955:1045
nginx: configuration file /tmp/nginx-cfg1414424955 test failed

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-02-11 14:01:51

正如我在问题下的评论中所说:

代码语言:javascript
复制
nginx: [emerg] duplicate location "/" in /tmp/nginx-cfg1414424955:1045

可能表示您已两次定义相同的位置。

如果您在path: /中有任何其他的侵入资源,那么您必须相应地编辑这些信息。

您可以用它们的路径获取所有的侵入资源。

代码语言:javascript
复制
kubectl get ingress -A -o=jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.rules[*].http.paths[*].path}{"\n"}{end}'
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/71077745

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档