kubectl apply -f deploy.yaml

Category: Kubernetes & Containers

kubectl apply -f deploy.yaml

Create or update resources from a manifest

Applies the resources declared in deploy.yaml, creating them if absent and updating them if present. kubectl apply is declarative: it records the last-applied config and only changes what differs. Prefer it over kubectl create for ongoing management.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.