Helm3入口控制器位置被拒绝,原因:格式无效(名称空间/名称)

问题描述 投票:0回答:1

我正在使用helm3在kubernetes中部署基于PHP的应用程序。我正在使用以下版本的入口控制器。我得到下面提到的错误。即使所需的名称空间中有秘密,它也会出现此错误。当我使用“ kubectl apply -f yaml”进行部署时,它可以很好地工作。 Nginx控制器支持带有此注释“ nginx.ingress.kubernetes.io/backend-protocol:“ HTTPS”的HTTPS后端,但是由于某种原因它无法被识别,如错误所示。有人可以帮忙吗?

NGINX Ingress controller
  Release:       0.30.0
  Build:         git-7e65b90c4
  Repository:    https://github.com/kubernetes/ingress-nginx
  nginx version: nginx/1.17.8

Nginx控制器错误

W0413 17:30:53.061666       6 main.go:60] Protocol "HTTPS" is not a valid value for the backend-protocol annotation. Using HTTP as protocol
W0413 17:30:56.382073       6 controller.go:1105] Error getting SSL certificate "tls-test/php-tls-secret": local SSL certificate tls-test/php-tls-secret was not found. Using default certificate
E0413 17:19:32.942187       6 annotations.go:200] error reading ProxySSL annotation in Ingress tls-test/abc-demo: Location denied, reason: invalid format (namespace/name) found in "abc-tls-secret

Values.yaml

  annotations:
    nginx.ingress.kubernetes.io/proxy-ssl-secret: |
      "tls-test/abc-tls-secret"
    nginx.ingress.kubernetes.io/auth-tls-secret: |
       "tls-test/php-tls-secret"
    nginx.ingress.kubernetes.io/backend-protocol: |
      "HTTPS"
kubernetes kubernetes-helm kubernetes-ingress
1个回答
0
投票
nginx.ingress.kubernetes.io/backend-protocol: |
  "HTTPS"

未将HTTPS指定为backend-protocol,而是将"HTTPS"\n指定为backned-protocol

nginx.ingress.kubernetes.io/backend-protocol: HTTPS

是正确的设置,不仅因为它删除了由yaml管道运算符引起的换行符,而且还消除了管道与文字"字符之间的双引号


至于错误消息,再清楚不过了:删除名称空间限定符,因为没有结果可以使Ingress资源查询除创建名称空间以外的任何名称空间

© www.soinside.com 2019 - 2024. All rights reserved.