在命名空间中启用 Istio
Enabling Istio in a namespacae
在创建命名空间 yaml 文件本身时,我应该如何启用 istio 注入作为命名空间中的辅助工具?我现在是手动做的,我可以在yaml文件中做些什么。
您可以在创建命名空间时通过设置 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
在创建命名空间 yaml 文件本身时,我应该如何启用 istio 注入作为命名空间中的辅助工具?我现在是手动做的,我可以在yaml文件中做些什么。
您可以在创建命名空间时通过设置 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