kubectl run

The kubectl command that starts a single pod from an image, handy for a quick test from inside the cluster.

In more detail

With --rm and -it the pod is interactive and deleted when you exit, which suits one-off checks such as a DNS lookup or a curl smoke test. It is imperative, so it leaves no manifest behind. Real workloads belong in manifests.

Example

kubectl run dns --image=busybox:1.36 --rm -it -- nslookup web

Related terms

Taught in

References

Certification courses