You should use an array, like ["command", ... ], IIRC the syntax correctly
On Wednesday, May 31, 2017, Sambit Mishra <sambitmishra...@gmail.com> wrote: > I have a process running inside an Ubuntu container and would like to > redeploy the container if the process gets killed. I added the following > liveness probe in container spec > -livenessProbe: > exec: > command: > - ps -ef | grep my_process_name > initialDelaySeconds: 120 > periodSeconds: 30 > However this doesnt work. When I do a kubectl describe pods I get the > following event. > > 1h 6m 20 {kubelet k8s-agent-71e8d996-0} spec.containers{my_process_name} > Warning Unhealthy Liveness probe failed: rpc error: code = 13 desc = > invalid header field value "oci runtime error: exec failed: > container_linux.go:247: starting container process caused \"exec: \\"ps -ef > | grep my_process_name\\": executable file not found in $PATH\"\n" > > And it keeps redeploying the container. If I bash into the container and > do a 'ps -ef' it works but this doesnt Whats a good way to use the liveness > probe to check if a process is running or not ? > > -- > You received this message because you are subscribed to the Google Groups > "Kubernetes user discussion and Q&A" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to kubernetes-users+unsubscr...@googlegroups.com > <javascript:_e(%7B%7D,'cvml','kubernetes-users%2bunsubscr...@googlegroups.com');> > . > To post to this group, send email to kubernetes-users@googlegroups.com > <javascript:_e(%7B%7D,'cvml','kubernetes-users@googlegroups.com');>. > Visit this group at https://groups.google.com/group/kubernetes-users. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group. To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscr...@googlegroups.com. To post to this group, send email to kubernetes-users@googlegroups.com. Visit this group at https://groups.google.com/group/kubernetes-users. For more options, visit https://groups.google.com/d/optout.