The 400 error is because the ALLOWED_HOSTS forbids requests using localhost as a hostname. You should include the header Host: lms or Host: cms
You can add the header to the probe:
livenessProbe:
httpGet:
httpHeaders:
- name: Host
value: lms
path: /heartbeat
port: 8000
Or you can edit your ALLOWED_HOSTS setting.