Does `kubectl replace` on a CRD cause the existing custom resources (created from the aforementioned CRD) to be deleted

Cluster information:

Kubernetes version: v1.20
Cloud being used: bare-metal

Hi,
In the documentation I see that, deleting a custom resource definition( kubectl delete ) results in all the custom resources of that type getting deleted.

Delete a CustomResourceDefinition
When you delete a CustomResourceDefinition, the server will uninstall the RESTful API endpoint and delete all custom objects stored in it.

What happens if we run kubectl replace on a custom resource definition? Does that have a similar effect? i.e. Is there a chance of the existing custom resources being deleted?

Hello,

I’m thrilled to announce that I tested the behavior, and the existing custom resources were not deleted when the CRD was updated with kubectl replace!