Commands.app

kubectl run

Resource Management

Run a pod

Options & Flags
Available options for this command
--image

Container image

--rm

Delete pod after exit

-it

Interactive with TTY

--restart

Restart policy (Always, OnFailure, Never)

Examples
Common usage examples

Run nginx pod

kubectl run nginx --image=nginx

Run temporary debug pod

kubectl run -it busybox --image=busybox --rm -- sh

Test service connectivity

kubectl run curl --image=curlimages/curl --rm -it -- curl http://myservice
Notes
  • Useful for quick debugging
Related Commands
You might also find these useful