NoServerCertificateVerificationPortLevel

消息名称NoServerCertificateVerificationPortLevel
消息代码IST0129
描述No caCertificates are set in DestinationRule, this results in no verification of presented server certificate for traffic to a given port.
等级Warning

当流量策略需要 caCertificates 时,但目标规则(Destination Rule)中没有设置相关信息时会出现该错误。

示例

当您的集群中具有以下目标规则(Destination Rule)时:

  1. apiVersion: networking.istio.io/v1alpha3
  2. kind: DestinationRule
  3. metadata:
  4. name: db-tls
  5. spec:
  6. host: mydbserver.prod.svc.cluster.local
  7. trafficPolicy:
  8. portLevelSettings:
  9. - port:
  10. number: 443
  11. tls:
  12. mode: SIMPLE
  13. clientCertificate: /etc/certs/myclientcert.pem
  14. privateKey: /etc/certs/client_private_key.pem
  15. sni: my-nginx.mesh-external.svc.cluster.local
  16. # caCertificates not set

您将会收到以下信息:

  1. Error [IST0129] (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 at port number:443

在这个示例中,目标规则 db-tls 被指定为 TLS ,但是没有提供相关 CA 证书。

解决方案

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