Istio SIde car injection

9/18/2019

I need to add an sidecar to run alongside my main container in K8S during runtime. I have currently done this using a script which edits the deployment.yaml to add all necessary parts including the container and any shared volume mounts etc. This currently works but is a bit ugly. I started looking at Istio for automatic sidecar injection but the documentation is a bit unclear to me.

  1. Can I provide user defined values for the sidecar when injecting the sidecar ( such as image for the container and paths for shared volume mounts
  2. Does it support injection for specific types are will it only inject sidecars for pod types ?
-- JAbeywrdana
istio
kubernetes

1 Answer

9/18/2019

istio, as many other kube-native apps, uses k8s admission-controller and the admission-webhooks api to patch the deployment and inject the sidecar, take a look at https://github.com/istio/istio/blob/master/pkg/kube/inject/inject.go

-- Efrat Levitan
Source: StackOverflow