kubectl apply¶
Description¶
kubectl apply creates or updates Kubernetes resources using configuration files.
It compares the configuration defined in a file with the current cluster state and applies the necessary changes.
Syntax¶
Examples¶
Apply a Configuration File
Apply a Directory of Manifests
Apply Resources from a URL
Example Manifest
Typical Use Cases¶
- deploying applications
- updating configurations
- managing infrastructure as code
Related Commands¶
- kubectl get
- kubectl describe