Some Pods don't have an Istio sidecar proxy injected.
By default, the Istio module does not automatically inject an Istio sidecar proxy into any Pods you create. To inject a Pod with an Istio sidecar proxy, you must explicitly enable injection for the Pod's Deployment or for the entire namespace. If you have done this and the sidecar is still not installed, follow the solution steps to identify which settings are preventing the injection.
A Pod is not injected with an Istio sidecar proxy if:
- Istio sidecar proxy injection is disabled at the namespace level
- The
sidecar.istio.io/inject
label on the Pod is set to false - The Pod's
spec
containshostNetwork: true
Find out which Pods do not have Istio sidecar proxy injection enabled and why. You can either inspect Pods across all namespaces, focus on a specific namespace, or verify why a selective Pod is not injected.
-
Download the sidecar analysis script.
-
Run the script.
./sidecar-analysis.sh
You get an output similar to this one:
See all Pods that are not part of the Istio service mesh: Pods in namespaces labeled with "istio-injection=disabled": - namespace/Pod ... Pods labeled with "sidecar.istio.io/inject=false" in namespaces labeled with "istio-injection=enabled": - namespace/Pod ... Pods not labeled with "sidecar.istio.io/inject=true" in unlabeled namespaces: - namespace/Pod ...
-
To learn how to include a Pod into the Istio service mesh, see Enabling Istio Sidecar Proxy Injection.
-
Download the sidecar analysis script.
-
Run the script passing the namespace name as a parameter.
./sidecar-analysis.sh {YOUR_NAMEPSACE}
You get an output similar to this one:
In the namespace default, the following Pods are not part of the Istio service mesh: - Pod - Pod ... Reason: The namespace default has Istio sidecar proxy injection disabled, so none of its Pods have been injected with an Istio sidecar proxy.
-
To learn how to include a Pod into the Istio service mesh, see Enabling Istio Sidecar Proxy Injection.
-
Use Kyma dashboard.
-
Go to the Pod's namespace.
-
Check if Istio sidecar proxy injection is enabled at the namespace level.
Verify if the
Labels
section containsistio-injection=disabled
oristio-injection=enabled
. If Istio sidecar proxy injection is disabled at the namespace level, none of its Pods are injected with an Istio sidecar proxy. -
Check if Istio sidecar proxy injection is enabled for the Pod's Deployment.
In the Workloads section, select Deployments and choose Edit. In the
UI Form
section, check if theEnable Sidecar Injection
toggle is switched. -
Check if the label
sidecar.istio.io/inject: false
is set on a Pod.In the Workloads section, select Pods. Search for
sidecar.istio.io/inject: false
. If your Pod is displayed on the list, it has the label set. -
To learn how to include a Pod into the Istio service mesh, see Enabling Istio Sidecar Proxy Injection.
-
-
Use kubectl.
-
Check if Istio sidecar proxy injection is enabled at the namespace level.
Run the command:
kubectl get namespaces {POD_NAMESPACE} -o jsonpath='{ .metadata.labels.istio-injection }'
-
Check if Istio sidecar proxy injection is enabled for the Pod's Deployment.
Run the command:
kubectl get deployments {POD_DEPLOYMENT} -n {NAMESPACE} -o jsonpath='{ .spec.template.metadata.labels }'
-
Check if the label
sidecar.istio.io/inject: false
is set on a Pod.kubectl get pod {POD} -n default -o=jsonpath='{.metadata.labels.sidecar\.istio\.io/inject}
-
To learn how to include a Pod into the Istio service mesh, see Enabling Istio Sidecar Proxy Injection.
-