I would like to run a one-off container Pod from the command line in my Kubernetes cluster. I am looking for the equivalent of:
docker run --rm -it centos /b
In order to have a Pod
created instead of a Deployment
and to have it removed by itself when you exit it, try this:
kubectl run curl-debug --rm -i --tty --restart=Never --image=radial/busyboxplus:curl -- /bin/sh
The --restart=Never
flag is what it says to create a Pod
instead of a Deployment
object
Also - This image is lightweight, downloads fast and is good for network debugging.
Hope that helps