【问题标题】:Enabling Istio in a namespacae在命名空间中启用 Istio
【发布时间】:2020-10-16 00:11:27
【问题描述】:

在创建命名空间 yaml 文件本身时,我应该如何在命名空间中启用 istio 注入作为侧车?我现在是手动做的,我可以在yaml文件中进行哪些更改。

【问题讨论】:

  • 您可以在Istio Docs中找到此信息以及更多信息

标签: kubernetes namespaces google-kubernetes-engine istio


【解决方案1】:

您可以在创建命名空间时通过将istio-injection=enabled 设置为标签来启用命名空间中的 Istio 注入。

kind: Namespace
apiVersion: v1
metadata:
  name: test
  labels:
    istio-injection: enabled

您可以使用kubectl get ns --show-labels=true 命令查看标签

[node2 ~]$ kubectl get ns --show-labels=true
NAME              STATUS   AGE     LABELS
default           Active   3m8s    <none>
kube-node-lease   Active   3m9s    <none>
kube-public       Active   3m9s    <none>
kube-system       Active   3m9s    <none>
test              Active   2m26s   istio-injection=enabled

【讨论】:

    猜你喜欢
    • 2020-11-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-06-26
    • 1970-01-01
    • 2019-05-25
    相关资源
    最近更新 更多