run
Using run command
	Create and run a particular image in a pod. Pods are the smallest deployable units of computing that you can create and manage in Kubernetes.
Important
run command is deprecated
Command
$ kubectl run NAME --image=image [--env="key=value"] [--port=port] [--dry-run=server|client] [--overrides=inline-json] [--command] -- [COMMAND] [args...]
Example
Command
kubectl run nginx --image=nginx
Output
$ kubectl get pods
NAME                     READY   STATUS    RESTARTS   AGE
nginx-6db489d4b7-tsfhq   1/1     Running   0          28s
$ kubectl get deployment
NAME    READY   UP-TO-DATE   AVAILABLE   AGE
nginx   1/1     1            1           44s
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified September 23, 2020: docs update (b46eb86)