<p>We are using Istio with Kubernetes and have automatic sidecar injection enabled. The Istio proxy pod gets injected a few seconds after the pod is created and this is causing issues with the start of our service. We are making a mongo connection at the start of service and since the Istio proxy is not up by that time with service entries imposed error occurs.</p>

<p>Is it possible to ensure that the sidecar gets injected concurrently with the pod?</p>

Anshul Prakash
<p>Not really from the Istio side. However, you can try adding <a href="https://kubernetes.io/docs/tasks/configure-pod-container/configure-liveness-readiness-probes/#define-readiness-probes" rel="nofollow noreferrer">readiness probes</a> to your containers in your pods. You can add it with an <code>initialDelaySeconds</code>. This way they don't get any traffic until the Envoy proxy is fully operational.</p>

<p>Another option is to add a wrapper to your app in your container so that it waits for the envoy proxy to be injected until it really starts.</p>
