I was experimenting with the default-not-ready-toleration-seconds in Kubernetes to lower the time before pods get terminated on a NotReady node in the cluster. However I noticed that the CRI (Docker) will of course not kill the running container by itself if Kubelet is down. Therefore when Kubernetes decide to terminate the pod, the container will still run if it is unable to communicate with Kubelet and you will end up with 2 containers running.
My question is, is there a way to make the CRI independently make the decision to kill a container if Kubelet have not been running for a set timeout?
# docker ps | grep busybox
5cb58ea42982 busybox "tail -f /dev/null" 45 hours ago Up 45 hours
# systemctl stop kubelet
# kubectl get pod busybox-test-busybox-69b844bd79-wsdvp
NAME READY STATUS
busybox-test-busybox-69b844bd79-wsdvp 1/1 Terminating
### WAIT WAIT WAIT...
# docker ps | grep busybox
5cb58ea42982 busybox "tail -f /dev/null" 45 hours ago Up 45 hours