Hi all, when i run the below the command. k run busybox --image=busybox -it --r . . .

Wong Song Ern:
Hi all, when i run the below the command.
k run busybox --image=busybox -it --rm --restart=Never – sh

pod “busybox” deleted
error: timed out waiting for the condition
sometimes it will throw the above error message. how can i resolve it? thank you

LonnyBarry:
The command appears to be formatted correctly and executes fine here. I would look towards the more tentative elements, such as pulling the image, is the repository available, is the container erroring due to available resources, etc.

Wong Song Ern:
thank you… let me debug more… thanks.

Mayur Sharma:
@Wong Song Ern Try this k run busybox --image=busybox -it --rm --restart=Never – /bin/sh

Not sure, but I think it is not able to find the command sh.

unnivkn:
@Wong Song Ern please try this: k run busybox --image=busybox --command sleep 1000 -it --rm --restart=Never – sh

Ravan Nannapaneni:
@unnivkn did you try this command, Kubectl will assume the " – " as the start of the command and will take everything else as command. In your case “command sleep 1000 -it --rm --restart=Never – sh” will be seen as command and wouldn’t work.

unnivkn:
Hi Ravan… you are right its not working. Infarct I didn’t tested. Thank you for the correction. controlplane k get po No resources found in default namespace. controlplane k run busybox --image=busybox -it --rm --restart=Never – sh
If you don’t see a command prompt, try pressing enter.
/ #
/ # hostname
busybox
/ # exit
pod “busybox” deleted
controlplane $

unnivkn:
controlplane k get po No resources found in default namespace. controlplane
controlplane k run busybox --image=busybox -it --rm -- sh If you don't see a command prompt, try pressing enter. / # / # hostname busybox / # exit Session ended, resume using 'kubectl attach busybox -c busybox -i -t' command when the pod is running pod "busybox" deleted controlplane