how to kill the kubernetes job if the command return code is nonzero

1/7/2019

There is command in my Kubernetes Manifest File which when runs there would be return code 7 (sometimes). Though the return code is 7 ideally the Kube Job doesn't fail, but it would complete successfully if the return code is 0.

How do we setup the Job to fail if the Return code is non-zero?

-- Ram
kubectl
kubernetes

0 Answers