在 namepacae 中启用 Istio



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

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

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

最新更新