UnknownDestinationRuleHost
当 DestinationRule 的 host 与网格中的任何服务都不匹配时,会出现此消息。
该服务可以是 Kubernetes Service,也可以是 ServiceEntry 中的主机。
示例
假设不存在 reveiws 服务,并有如下 DestinationRule:
apiVersion: networking.istio.io/v1
kind: DestinationRule
metadata:
name: reviews
spec:
host: reveiws您将收到以下消息:
Warning [IST0174] (DestinationRule default/reviews) The host reveiws defined in the DestinationRule does not match any services in the mesh.如何修复
- 确保主机名拼写正确。
- 如果服务位于不同的命名空间中,请使用主机的完全限定名称,
例如
reviews.bookinfo.svc.cluster.local。 - 确保服务的
exportTo字段使其对DestinationRule所在的命名空间可见。 - 如果主机位于网格外部,请为其创建
ServiceEntry。