kubectl apply — Basic UsageIT technician command center
Containers · Docker and Kubernetes

kubectl apply — Basic Usage

Use kubectl apply for a standard administrative task.

Copy-ready commandkubectl apply — Basic Usage
kubectl apply -f deployment.yaml
Production warning

Stop, prune, delete, scale, restart, and apply operations can change running services.

Requirements and permissions

Requirements
Docker Engine, Docker Compose, or kubectl
Permissions
Container or cluster permissions vary
Last reviewed
2026-07-31

Examples

Basic Usage

Use kubectl apply for a standard administrative task.

kubectl apply -f deployment.yaml

Original command

Apply Kubernetes configuration.

kubectl apply -f deployment.yaml

Common errors

Command not found

Confirm Docker Engine, Docker Compose, or kubectl is installed and available in your current shell.