代码之家  ›  专栏  ›  技术社区  ›  Paddy

Traefik不会从Kubernetes中的入口定义中选择TLS证书机密。

  •  0
  • Paddy  · 技术社区  · 6 年前

    当我只向入口添加TLS机密时,traefik会提供它的默认证书。

    kind: Ingress
    spec:
      rules:
        ....
      tls:
      - secretName: ingress-mgt-server-keys
    

    只有当我挂载秘密并添加下面的参数时,traefik才会开始提供真正的证书。

    entryPoints.https.tls.certificates(入口点.https.tls.certificates)

    在入口和入口控制器中是否都要定义TLS机密? ?这迫使我重复这些键作为所有入口名称空间以及入口控制器名称空间的秘密。

    [更新]:traefik有rbac从目标命名空间读取机密。

    2 回复  |  直到 6 年前
        1
  •  1
  •   Ho Man    6 年前

    嗯,似乎不是这样。

    https://docs.traefik.io/user-guide/kubernetes/#add-a-tls-certificate-to-the-ingress

    In addition to the modified ingress you need to provide the TLS certificate via a Kubernetes secret in the same namespace as the ingress.

        2
  •  -2
  •   Paddy    6 年前

    不需要在目标(入口)命名空间中设置TLS机密。

    只有入口控制器命名空间需要TLS机密。