kubectl delete -f deploy.yaml

Category: Kubernetes & Containers

kubectl delete -f deploy.yaml

Delete resources defined in a manifest

Deletes every resource declared in deploy.yaml, in dependency order. This is the clean counterpart to kubectl apply -f deploy.yaml. Check the file contents first, because the command removes anything listed there.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.