ReferencedResourceNotFound

消息名称ReferencedResourceNotFound
消息代码IST0101
描述A resource being referenced does not exist.
等级Error

当 Istio 资源引用另一个不存在的资源时,会出现此消息。 这会导致 Istio 尝试查找引用的资源但找不到这类的错误。

例如,您会收到这个错误提示:

  1. Error [IST0101] (VirtualService httpbin.default) Referenced gateway not found: "httpbin-gateway-bogus"

在以下例子中,VirtualService 指向了一个不存在的网关:

  1. apiVersion: networking.istio.io/v1
  2. kind: Gateway
  3. metadata:
  4. name: httpbin-gateway
  5. spec:
  6. selector:
  7. istio: ingressgateway
  8. servers:
  9. - port:
  10. number: 80
  11. name: http2
  12. protocol: HTTP2
  13. hosts:
  14. - "*"
  15. ---
  16. apiVersion: networking.istio.io/v1
  17. kind: VirtualService
  18. metadata:
  19. name: httpbin
  20. spec:
  21. hosts:
  22. - "*"
  23. gateways:
  24. - httpbin-gateway-bogus # 应该是 "httpbin-gateway"
  25. http:
  26. - route:
  27. - destination:
  28. host: httpbin-gateway

要解决此问题,请在详细的错误消息中找到资源类型,修正 Istio 配置并重试。