'Kubernetes trigger job on condition

I would like to trigger a job on some condition: if:

kubectl get jobs -n <namespace> --field-selector status.successful=1 | grep "export"

do another job: perform removal:

kubectl get jobs -n <namespace> | grep "removal"

Such pods managing is possible?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source