Delete resources by filenames, stdin, resources and names, or by resources and label selector
Delete resources by filenames, stdin, resources and names, or by resources and label selector. JSON and YAML formats are accepted.
Note that the delete command does NOT do resource version checks
kubedb delete ([-f FILENAME] | TYPE [(NAME | -l label | --all)]) [flags]
# Delete a elasticsearch using the type and name specified in elastic.json. kubedb delete -f ./elastic.json # Delete a postgres based on the type and name in the JSON passed into stdin. cat postgres.json | kubedb delete -f - # Delete elasticsearch with label elasticsearch.kubedb.com/name=elasticsearch-demo. kubedb delete elasticsearch -l elasticsearch.kubedb.com/name=elasticsearch-demo # Force delete a mysql object kubedb delete mysql ms-demo --force # Delete all mysql objects kubedb delete mysql --all
--all Delete all resources, including uninitialized ones, in the namespace of the specified resource types. -f, --filename strings Filename to use to delete the resource -h, --help help for delete -n, --namespace string Delete object(s) from this namespace. (default "default") -o, --output string Output mode. Use "-o name" for shorter output (resource/name). -R, --recursive Process the directory used in -f, --filename recursively. -l, --selector string Selector (label query) to filter on.
--analytics Send analytical events to Google Analytics (default true) --kube-context string name of the kubeconfig context to use