Unable to point the difference in Kubernetes PODS configurations

7/19/2021

What is the difference between these 2 pod definitions? One of the left does not come in READY status ever.

I renamed the one on the left to myredis_err and printed the logs. The logs are the same. But check the status. I am thoroughly confused.

enter image description here

Also, why the solution had restartPolicy as Always? The question does not mention restart behavior at all.

TIA.

-- coretechie
kubernetes
kubernetes-pod

1 Answer

7/19/2021

if i understand your question correctly you need to specify the liveness/readiness probe in one of the following formats:

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

or

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

kubernetes will not understand the - redis-cli PING as you have specified it

more information can be found on the official documentation.

-- meaningqo
Source: StackOverflow