Terminate istio sidecar istio-proxy for a kubernetes job / cronjob Terminate istio sidecar istio-proxy for a kubernetes job / cronjob kubernetes kubernetes

Terminate istio sidecar istio-proxy for a kubernetes job / cronjob


- command:  - /bin/sh  - -c  - |    until curl -fsI http://localhost:15021/healthz/ready; do echo \"Waiting for Sidecar...\"; sleep 3; done;    echo \"Sidecar available. Running the command...\";    <YOUR_COMMAND>;    x=$(echo $?); curl -fsI -X POST http://localhost:15020/quitquitquit && exit $x


This was not a misconfiguration, this was a bug in upstream Kubernetes. As of September of 2019, this has been resolved by Istio by introducing a /quitquitquit endpoint to the Pilot agent.

Unfortunately, Kubernetes has not been so steadfast in solving this issue themselves. So it still does exist in some facets. However, the /quitquitquit endpoint in Istio should have resolved the problem for this specific use case.


I have found a work around by editing the configmap of istio-sidecar-injector as per the link Istio documentation

https://istio.io/docs/setup/additional-setup/sidecar-injection/

apiVersion: v1kind: ConfigMapmetadata: name: istio-sidecar-injectordata: config: |- policy: enabled neverInjectSelector: - matchExpressions: - {key: job-name, operator: Exists}But with this changes in our cronjob sidecar will not inject and istio policy will not apply on the cronjob job, and in our case we dont want any policy to be enforced by istio

Note :- job-name is by default label gets added in the pod creation