<p>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.</p>
<p>I am very new to k8s so not much familiar to the different ways to do it.</p>

<p>liveness probe for celery worker:
This command only works when remote control is enabled.</p>
<pre><code>$ celery inspect ping -d &lt;worker_name&gt; --timeout=&lt;timeout_time&gt;
</code></pre>
<p>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.</p>
<p>so in yaml:</p>
<pre><code>      livenessProbe:
        initialDelaySeconds: 45
        periodSeconds: 60
        timeoutSeconds: &lt;timeout_time&gt;
        exec:
          command:
          - &quot;/bin/bash&quot;
          - &quot;-c&quot;
          - &quot;celery inspect ping -d &lt;worker_name&gt; | grep -q OK&quot;
</code></pre>
<p>Of course you have to change the <strong>worker name</strong> and <strong>timeout</strong> to your own values</p>
