Istio Not Creating Sidecars

If Istio is not creating sidecars when you enable sidecar injection, there are a few things you can check:

  1. Check if the istio-sidecar-injector webhook is running:

kubectl get mutatingwebhookconfiguration istio-sidecar-injector -n istio-system -o yaml

This should show the istio-sidecar-injector webhook with a status of AdmissionController and the istio-sidecar-injector pod running in the istio-system namespace.

  1. Verify that your application deployment has the istio.io/rev annotation:

kubectl describe deployment <your-deployment> -n <your-namespace>

Look for the Annotations: section and make sure it includes the istio.io/rev annotation with the Istio version you have installed. For example, istio.io/rev: 1.16.1.

  1. Verify that your application pod has the istio-proxy container:

kubectl describe pod <your-pod> -n <your-namespace>

Look for the Containers: section and make sure it includes the istio-proxy container.

  1. Look for the Containers: section and make sure it includes the istio-proxy container.

kubectl get configmap istio-sidecar-injector -n istio-system -o yaml

Look for the values.global.proxy.image field and make sure it points to the Istio proxy image for the version you have installed.

If all of the above checks look good, and you’re still not seeing the sidecar being injected, there may be an issue with the webhook or with the configuration of your Kubernetes cluster. You can check the logs of the istio-sidecar-injector pod for any errors or warnings that may indicate the issue.