Commands.app

kubectl create

Resource Management

Create resources from file or stdin

Options & Flags
Available options for this command
-f

Filename or URL

--dry-run

Preview without creating

-n

Namespace

Examples
Common usage examples

Create from YAML file

kubectl create -f deployment.yaml

Create namespace

kubectl create namespace mynamespace

Create secret from literal

kubectl create secret generic mysecret --from-literal=key=value

Create configmap from file

kubectl create configmap myconfig --from-file=config.txt
Notes
  • Use 'apply' for declarative management
Related Commands
You might also find these useful