Containerized Sanlock Daemon can be used to build a container image that runs sanlock.
The image repository: sanlock-daemon.
Sanlock can clear the process within a specified time. Otherwise, the watchdog device is required to reset the host. If you do not have a hardware watchdog, you can enable softdog
in the following ways.
cat >> /etc/rc.local <<EOF
#!/bin/bash
/usr/sbin/modprobe softdog
EOF
chmod +x /etc/rc.local
modprobe softdog
You can refer to the sample daemonset-in-k8s.yaml to see how to use the container image in Kubernetes.