无法指出 Kubernetes PODS 配置的差异

Unable to point the difference in Kubernetes PODS configurations

我把左边那个重命名为myredis_err然后打印日志。日志是相同的。但是检查状态。我彻底糊涂了。

此外,为什么该解决方案始终使用 restartPolicy?这个问题根本没有提到重启行为。

TIA。

如果我正确理解你的问题,你需要以下列格式之一指定 liveness/readiness 探测器:

readynessProbe:
  exec: 
    command: ["redis-cli", "PING"]

readynessProbe:
  exec: 
    command:  
    - redis-cli
    - PING 

kubernetes 不会理解您指定的 - redis-cli PING

可以在 official documentation 上找到更多信息。