.TH "KUBERNETES" "1" " kubernetes User Manuals" "Eric Paris" "Jan 2015" "" .SH NAME .PP kubectl delete \- Delete a resource by filename, stdin, or resource and ID. .SH SYNOPSIS .PP \fBkubectl delete\fP [OPTIONS] .SH DESCRIPTION .PP Delete a resource by filename, stdin, resource and ID, or by resources and label selector. .PP JSON and YAML formats are accepted. .PP If both a filename and command line arguments are passed, the command line arguments are used and the filename is ignored. .PP Note that the delete command does NOT do resource version checks, so if someone submits an update to a resource right when you submit a delete, their update will be lost along with the rest of the resource. .PP Examples: .PP .RS .nf // Delete a pod using the type and ID specified in pod.json. $ kubectl delete \-f pod.json // Delete a pod based on the type and ID in the JSON passed into stdin. $ cat pod.json | kubectl delete \-f \- // Delete pods and services with label name=myLabel. $ kubectl delete pods,services \-l name=myLabel // Delete a pod with ID 1234\-56\-7890\-234234\-456456. $ kubectl delete pod 1234\-56\-7890\-234234\-456456 // Delete all pods $ kubectl delete pods \-\-all .fi .RE .SH OPTIONS .PP \fB\-\-all\fP=false [\-all] to select all the specified resources .PP \fB\-f\fP, \fB\-\-filename\fP=[] Filename, directory, or URL to a file containing the resource to delete .PP \fB\-l\fP, \fB\-\-selector\fP="" Selector (label query) to filter on .SH SEE ALSO .PP \fBkubectl(1)\fP, .SH HISTORY .PP January 2015, Originally compiled by Eric Paris (eparis at redhat dot com) based on the kubernetes source material, but hopefully they have been automatically generated since!