NamespaceMultipleInjectionLabels

當命名空間使用新舊樣式的標籤指定 Istio sidecar 自動注入時,會出現此訊息。

範例

您將收到此訊息

Warning [IST0123] (Namespace busted) The namespace has both new and legacy injection labels. Run 'kubectl label namespace busted istio.io/rev-' or 'kubectl label namespace busted istio-injection-'

當您的叢集有以下命名空間時

apiVersion: v1
kind: Namespace
metadata:
  name: busted
  labels:
    istio-injection: enabled
    istio.io/rev: canary

在此範例中,命名空間 busted 使用舊式和新式注入標籤。

如何解決

  • 移除 istio-injection 標籤
  • 移除 istio.io/rev 標籤