I am using https://pypi.org/project/django-health-check/ for my health checks in a Django app run through kubernetes_wsgi with the following YAML:
livenessProbe:
httpGet:
path: /ht/
port: 8020
httpHeaders:
- name: Host
value: pdt-staging.nagyv.com
initialDelaySeconds: 5
periodSeconds: 10
successThreshold: 1
failureThreshold: 10
readinessProbe:
httpGet:
path: /ht/
port: 8020
httpHeaders:
- name: Host
value: pdt-staging.nagyv.com
initialDelaySeconds: 20
timeoutSeconds: 5
The pod logs claim that the probe was successful:
INFO:twisted:"-" - - [22/Jul/2022:22:11:07 +0000] "GET /ht/ HTTP/1.1" 200 1411 "-" "kube-probe/1.22"
At the same time, the pod events deny this:
Liveness probe failed: Get "http://10.2.1.43:8020/ht/": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
... and after a while, the pod regularly restarts.
The pod seems to be fully functional. I can reach the /ht/
endpoint as well. Everything seems to work, except for the liveness probes.
I read about slow responses causing the issue, but this is pretty fast.
Any idea what the issue might be?