Istio实战(十三)-SideCar注入

        查看默认sidecar配置

kubectl get mutatingwebhookconfiguration istio-sidecar-injector -o yaml | grep "namespaceSelector:" -A5
 
  namespaceSelector:
    matchLabels:
      istio-injection: enabled
  objectSelector: {}
  reinvocationPolicy: Never
  rules:

        可以看出,istio默认sidecar注入规则是,namespace带有标签istio-injection: enabled才会注入sidecar。

        查看哪些namespace已经配置注入:

[root@k8s-master istio-1.4.2]# kubectl get namespace -L istio-injection
NAME              STATUS   AGE   ISTIO-INJECTION
default           Active   70d   
ingress-nginx     Active   69d   
istio-system      Active   19h   
kube-node-lease   Active   70d   
kube-public       Active   70d   
kube-system       Active   70d   
naftis            Active   19h   
test-deri         Active 

你可能感兴趣的:(Istio实战教程,istio,云原生)