kubectl create
SafeCreate resources
kubectl create deployment <name> --image=<img>
Imperative creation — most useful today as a YAML generator via --dry-run=client -o yaml.
Examples
kubectl create deploy web --image=nginx --dry-run=client -o yaml > web.yamlGenerate a manifest
Syntax
kubectl create <kind> <name> [options] [--dry-run=client -o yaml]
Before you run it
--dry-run creates nothing.
Related commands
- kubectl applyApply manifests
- kubectl runRun ad-hoc pods
- kubectl exposeExpose as a Service
The same reference, with no signal at all
Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).
Get it free on the App Store