When a I spin a Busybox deployment using an Imperative command
k run box1 --image=busybox --command – sleep 100
k run box1 --image=busybox --command – /bin/sh -c “sleep 100”
As I understand in the second case as soon as the container is started it will invoke the shell and execute the command sleep 100. But how does the case #1 work ?
In your 1st example, the --command flag in you imperative command will override the default ENTRYPOINT of the image.
In you 2nd example, "sleep 100" will result in an error as the first command needs to be an executable sleep in this case, and the second needs to be an arg to sleep. The command and its args should be separate elements in the array.