Hi, I would like to ask about the command section in a pod or a job:
I see different versions of commands that are somehow confusing.
To be specific:
command: [“/bin/sh”, “-c”, “ps -eaf”]
or
command: [“date”].
Could not we write command: [“/bin/sh”, “-c”, “date”] ?
To my knowledge /bin/sh opens a new bash shell in the container of a pod.
Could we in short simply write command: [“date”]?
or the other way with args is also a little bit confusing:
containers:
- args:
** - /bin/sh**
** - -c**
** - echo hello;sleep 3600**
image: busybox
imagePullPolicy: IfNotPresent
name: busybox
resources: {}
- args:
** - /bin/sh**
** - -c**
** - echo hello;sleep 3600**
image: busybox
name: busybox2
Is somewhere only possible to use args instead of the “command” that seem to be more readable?