I'm managing a application inside kubernetes, I have a front end (nginx, flask) and a backend (celery) Long running tasks are sent to the backend using a middle-ware (rabbitmq)
My issue here is that i can receive long running tasks at anytime, and i don't want it to disturb my plan of upgrading the version of my application.
I'm using the command kubectl apply -f $MY_FILE to deploy/update my application. But if i do it when a celery po is busy, the pod will be terminated, and i'll be losing the task.
I tried using the readiness probe, but the pods are still being terminated. My question is, is there a way for kube to target only 'free' pods, and wait for the busy on to finish ?
Thank you