I want to set-up liveness and readiness probes for Celery worker pods.
Since these worker pods doesn’t have a specific port associated to them I am finding it difficult.
Main Django app nginx server was easier to set-up.
I am very new to k8s so not much familiar to the different ways to do it.
2
Answers
liveness probe for celery worker:
This command only works when remote control is enabled.
When a celery worker uses a solo pool, healthcheck waits for the task to finish. In this case, you must increase the timeout waiting for a response.
so in yaml:
Of course you have to change the worker name and timeout to your own values
Basically, configuration files in YAML for Celery liveness and readiness probes can be set up in a general way as described in Kubernetes docs. You can specifically adjust them for Celery pods based on your requirements, for example:
There is still ongoing GitHub issue on this matter – other solutions that might be useful for your set-up are described here.