參照的資源未找到
當 Istio 資源參考另一個不存在的資源時,就會發生此訊息。這會在 Istio 嘗試查找參考的資源卻找不到時導致錯誤。
例如,您會收到此錯誤
Error [IST0101] (VirtualService httpbin.default) Referenced gateway not found: "httpbin-gateway-bogus"
在此範例中,VirtualService
參考了一個不存在的閘道。
apiVersion: networking.istio.io/v1
kind: Gateway
metadata:
name: httpbin-gateway
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 80
name: http2
protocol: HTTP2
hosts:
- "*"
---
apiVersion: networking.istio.io/v1
kind: VirtualService
metadata:
name: httpbin
spec:
hosts:
- "*"
gateways:
- httpbin-gateway-bogus # Should have been "httpbin-gateway"
http:
- route:
- destination:
host: httpbin-gateway
要解決這個問題,請在詳細的錯誤訊息中尋找資源類型,更正您的 Istio 設定並重試。