istio.io/content/zh/docs/reference/config/analysis/ist0128/index.md

1.2 KiB
Raw Blame History

title layout owner test
NoServerCertificateVerificationDestinationLevel analysis-message istio/wg-user-experience-maintainers no

如果流量策略需要 caCertificates但是在目标规则Destination Rule中没有相关信息会出现该问题。

示例

当您的集群中包含以下目标规则时Destination Rule)

{{< text yaml >}} apiVersion: networking.istio.io/v1alpha3 kind: DestinationRule metadata: name: db-tls spec: host: mydbserver.prod.svc.cluster.local trafficPolicy: tls: mode: SIMPLE clientCertificate: /etc/certs/myclientcert.pem privateKey: /etc/certs/client_private_key.pem # caCertificates not set {{< /text >}}

您将会收到以下信息:

{{< text plain >}} Error [IST0128] (DestinationRule db-tls.default) DestinationRule default/db-tls in namespace default has TLS mode set to SIMPLE but no caCertificates are set to validate server identity for host: mydbserver.prod.svc.cluster.local {{< /text >}}

在这个示例中目标规则Destination Ruledb-tls 被明确为 TLS但是没有设置 CA 文件信息。

解决方案

  • 提供 CA 证书的文件名
  • 修改流量策略为不需要证书的类型