KUBERNETES(1) kubernetes KUBERNETES(1) (NAME) kubectl-delete - (stdin) (SYNOPSIS) kubectl delete [OPTIONS] (DESCRIPTION) (stdin) . JSON YAML . : . (pods) (graceful deletion) . ( grace period) --grace-period --now grace-period . . API . --force . : . --grace-period . : (force delete) . API . . (scheduler) (eviction) . delete (resource version) . CustomResourceDefinition (discovery cache) . "kubectl api-resources" . (OPTIONS) --all=false namespace. -A, --all-namespaces=false namespace . namespace --namespace . --cascade="background" "background" "orphan" "foreground" . ( ReplicationController) . background . --dry-run="none" "none" "server" "client" . client . server . --field-selector="" ( ) '=' '==' '!=' ( --field-selector key1=value1,key2=value2). . -f, --filename=[] . --force=false true API . . --grace-period=-1 . . . --force true ( ). --ignore-not-found=false "resource not found" ( ) . --all "true" . -i, --interactive=false true . -k, --kustomize="" kustomization. -f -R . --now=false true ( --grace-period=1). -o, --output="" . "-o name" (resource/name) . --raw="" URI DELETE . kubeconfig . -R, --recursive=false -f --filename. . -l, --selector="" ( ) '=' '==' '!=' 'in' 'notin' ( -l key1=value1,key2=value2,key3 in (value3)). . --timeout=0s . --wait=true true . (finalizers) . (OPTIONS INHERITED FROM PARENT COMMANDS) --as="" (impersonate) . (service account) namespace . --as-group=[] . --as-uid="" UID . --as-user-extra=[] . --cache-dir="/home/username/.kube/cache" --certificate-authority="" (certificate authority) --client-certificate="" TLS --client-key="" TLS --cluster="" kubeconfig --context="" kubeconfig --disable-compression=false true --insecure-skip-tls-verify=false true . HTTPS --kubeconfig="" kubeconfig CLI. --kuberc="" kuberc (preferences). export feature gate KUBECTL_KUBERC=false KUBERC=off . --match-server-version=false -n, --namespace="" namespace CLI --password="" (basic authentication) API --profile="none" . (none|cpu|heap|goroutine|threadcreate|block|mutex|trace) --profile-output="profile.pprof" --request-timeout="0" . ( 1s 2m 3h). ( timeout). -s, --server="" Kubernetes API --tls-server-name="" . hostname --token="" Bearer API --user="" kubeconfig --username="" API --version=false --version --version=raw --version=vX.Y.Z... --warnings-as-errors=false (EXAMPLES) # pod.json kubectl delete -f ./pod.json # kustomization.yaml - dir/kustomization.yaml kubectl delete -k dir # '.json' kubectl delete -f '*.json' # JSON (stdin) cat pod.json | kubectl delete -f - # "baz" "foo" kubectl delete pod,service baz foo # name=myLabel kubectl delete pods,services -l name=myLabel # kubectl delete pod foo --now # (dead node) kubectl delete pod foo --force # kubectl delete pods --all # kubectl delete pods --all --interactive (SEE ALSO) kubectl(1) (HISTORY) Eric Paris (eparis at redhat dot com) kubernetes ! Eric Paris Jan 2015 KUBERNETES(1)