库伯内斯:"Liveness probe failed: rm: cannot remove '/tmp/healthy': No such file or directory"

Kubernetes: "Liveness probe failed: rm: cannot remove '/tmp/healthy': No such file or directory"

安装应用程序的 helm 图表后,出现以下错误:

Liveness probe failed: rm: cannot remove '/tmp/healthy': No such file or directory

要删除的命令在 helm 图表的 pod 定义中

pod 已创建,但容器一直失败并显示上述错误。但是由于该文件不存在,我该如何先创建文件或至少解决错误?

明显的意图是标志文件 /tmp/healthy 不应再存在。

该代码存在错误,因为当它试图制作不存在的东西时,它会失败。

修复可能是使用 'rm -f'。


作为背景,'liveness probe' 是 kubernetes 对 pod 的运行状况或其他方面的定期检查。支票可以采用多种形式;一个简单的是指定文件的存在与否。