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 webRelated terms
- nslookup — A command that asks a DNS server what address a name resolves to.
- smoke test — A quick test that checks the most basic behaviour works after a deploy, before deeper testing or real traffic.
- declarative configuration — Describing the end result you want in files and letting a tool work out the steps, rather than typing each step as a command.
Taught in
- Two Hours, Twenty Tasks: Exam Strategy — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Jobs And CronJobs That Behave — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Design And Build: Timed Drill And Checkpoint — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Debugging Applications In Kubernetes — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Observability: Timed Drill And Checkpoint — Certified Kubernetes Application Developer (CKAD) Exam Prep
- Requests, Limits And Quotas — Certified Kubernetes Application Developer (CKAD) Exam Prep
- ServiceAccounts And Tokens — Certified Kubernetes Application Developer (CKAD) Exam Prep
- ClusterIP, Selectors, EndpointSlices And DNS — Kubernetes: Production-Grade Container Orchestration
- Troubleshooting: DNS, Empty Endpoints And Broken Routes — Kubernetes: Production-Grade Container Orchestration
- Troubleshooting: A Timed Service Recovery Drill — Kubernetes: Production-Grade Container Orchestration