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/v1alpha3
  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/v1alpha3
  17. kind: VirtualService
  18. metadata:
  19. name: httpbin
  20. spec:
  21. hosts:
  22. - "*"
  23. gateways:
  24. - httpbin-gateway-bogus # Should have been "httpbin-gateway"
  25. http:
  26. - route:
  27. - destination:
  28. host: httpbin-gateway

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