CRD: Document cleanup on delete. (#6075)

Make it clear that deleting a CRD deletes everything in it.
This commit is contained in:
Anthony Yeh 2017-10-27 10:15:22 -07:00 committed by Steve Perry
parent 1107757752
commit f71e041372
1 changed files with 17 additions and 0 deletions

View File

@ -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 %}