Explain commands in args

Hello everyone,

I have a question about an argument in a pod:
Could you explain me these following commands :

…
spec:
containers:
-name: liveness
image: busybox


 args:
 - /bin/sh
 - -c
 - touch /tmp/healthy; sleep 30; rm -rf /temp/healthy; sleep 600

livenessProbe:
exec:
command:
- cat
- /tmp/healthy
initialDelaySeconds: 5
periodSeconds: 5

Thank you

Hello, @hinin
sh command invokes the default shell.
With the help of touch command, it will create an empty file (called healthy) then will go to sleep for 30 seconds then after 30 seconds, it will delete that empty file called healthy from rm command then again will go to sleep for 600 seconds.

Regards,

1 Like

So fast! Thank you so much @Tej_Singh_Rana.
Have a good Weekend !
best regards

1 Like