Kubernetes 在名称空间中启用Istio

Kubernetes 在名称空间中启用Istio,kubernetes,namespaces,google-kubernetes-engine,istio,Kubernetes,Namespaces,Google Kubernetes Engine,Istio,在创建名称空间yaml文件本身时,应该如何启用istio注入作为名称空间中的辅助工具?目前我正在手动执行此操作,我可以在yaml文件中进行哪些更改。您可以在创建名称空间时将Istio injection=enabled设置为标签,在名称空间中启用Istio injection kind: Namespace apiVersion: v1 metadata: name: test labels: istio-injection: enabled 您可以使用kubectl get

在创建名称空间yaml文件本身时,应该如何启用istio注入作为名称空间中的辅助工具?目前我正在手动执行此操作,我可以在yaml文件中进行哪些更改。

您可以在创建名称空间时将
Istio injection=enabled
设置为标签,在名称空间中启用Istio injection

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
[node2~]$kubectl get ns--show labels=true
姓名、身份和年龄标签
默认激活3m8s
kube节点租赁活动3m9s
kube公共活动3M9
kube系统激活3m9s
测试激活2m26s istio注入=已启用

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