NamespaceNotInjected

當命名空間缺少啟用/停用 Sidecar 注入的 istio-injection 標籤,或指定 Sidecar 的 Istio 控制平面修訂版本的 istio.io/rev 標籤,或者未啟用 .values.sidecarInjectorWebhook.enableNamespacesByDefault 時,會出現此訊息。

例如,您會收到此錯誤

Warn [IST0102] (Namespace default) The namespace is not enabled for Istio
injection. Run 'kubectl label namespace default istio-injection=enabled' to
enable it, or 'kubectl label namespace default istio-injection=disabled' to
explicitly mark it as not needing injection Error: Analyzer found issues.

要解決此問題,請使用標籤明確宣告您是否要自動注入命名空間。例如

$ kubectl label namespace <namespace-name> istio-injection=enabled

強烈建議明確定義所需的注入行為。忘記將標籤新增到命名空間是錯誤的常見原因。