kubectl create
Resource ManagementCreate resources from file or stdin
Options & Flags
Available options for this command
-fFilename or URL
--dry-runPreview without creating
-nNamespace
Examples
Common usage examples
Create from YAML file
kubectl create -f deployment.yamlCreate namespace
kubectl create namespace mynamespaceCreate secret from literal
kubectl create secret generic mysecret --from-literal=key=valueCreate configmap from file
kubectl create configmap myconfig --from-file=config.txtNotes
- Use 'apply' for declarative management
Related Commands
You might also find these useful