diff --git a/docs/tasks/access-kubernetes-api/extend-api-custom-resource-definitions.md b/docs/tasks/access-kubernetes-api/extend-api-custom-resource-definitions.md index 39e724ae8f..d03f84254b 100644 --- a/docs/tasks/access-kubernetes-api/extend-api-custom-resource-definitions.md +++ b/docs/tasks/access-kubernetes-api/extend-api-custom-resource-definitions.md @@ -151,6 +151,23 @@ metadata: resourceVersion: "" selfLink: "" ``` + +## Delete a CustomResourceDefinition + +When you delete a CustomResourceDefinition, the server will uninstall the RESTful API endpoint +and **delete all custom objects stored in it**. + +```shell +kubectl delete -f resourcedefinition.yaml +kubectl get crontabs +``` + +```console +Error from server (NotFound): Unable to list "crontabs": the server could not find the requested resource (get crontabs.stable.example.com) +``` + +If you later recreate the same CustomResourceDefinition, it will start out empty. + {% endcapture %} {% capture discussion %}