Quick Actions
kubectl delete
Description
Delete resources by filenames, stdin, resources and names, or by resources and label selector.
Command
kubectl delete
Examples
Delete by file
kubectl delete -f deployment.yaml
Delete pod by name
kubectl delete pod my-pod
Delete all pods
kubectl delete pods --all
Parameters
Parameter | Type | Required | Description |
---|---|---|---|
-f |
string | No | Filename, directory, or URL to files |
--all |
string | No | Delete all resources in the namespace |
--force |
string | No | Immediate deletion |
Command Info
Category:
Resource Management
Type:
Kubernetes
Views:
13
Status:
Active
Tags
delete
remove