This commit is contained in:
MXuDong 2021-03-09 22:22:46 +08:00 committed by GitHub
parent 0421e0b8e5
commit b39b62b891
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 8 deletions

View File

@ -3,11 +3,9 @@ title: NamespaceNotInjected
layout: analysis-message
---
This message occurs when you have a namespace that is missing the
[annotation](/zh/docs/reference/config/annotations/) to indicate whether the
namespace is auto-injected, for example `sidecar.istio.io/inject`.
当命名空间缺少[注解](/zh/docs/reference/config/annotations/)来标记命名空间是否自动注入时会出现此错误,例如 `sidecar.istio.io/inject`
For example, you receive this error:
例如,您可能看到以下错误:
{{< text plain >}}
Warn [IST0102] (Namespace default) The namespace is not enabled for Istio
@ -16,12 +14,10 @@ enable it, or 'kubectl label namespace default istio-injection=disabled' to
explicitly mark it as not needing injection Error: Analyzer found issues.
{{< /text >}}
To resolve this problem, use an annotation to explicitly declare whether
or not you want the namespace to be auto-injected. For example:
要解决此问题,请您使用注解明确声明您是否希望命名空间被自动注入。例如:
{{< text bash >}}
$ kubectl label namespace <namespace-name> istio-injection=enabled
{{< /text >}}
It is strongly recommended to explicitly define the desired injection behavior.
Forgetting to annotate a namespace is a common cause of errors.
强烈建议您明确定义需要的注入行为。忘记对命名空间标记注解是导致错误的常见原因。