CRD: Document cleanup on delete. (#6075)
Make it clear that deleting a CRD deletes everything in it.
This commit is contained in:
@@ -151,6 +151,23 @@ metadata:
|
|||||||
resourceVersion: ""
|
resourceVersion: ""
|
||||||
selfLink: ""
|
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 %}
|
{% endcapture %}
|
||||||
|
|
||||||
{% capture discussion %}
|
{% capture discussion %}
|
||||||
|
|||||||
Reference in New Issue
Block a user