sigs.k8s.io/cluster-api@v1.7.1/docs/book/src/clusterctl/commands/delete.md (about) 1 # clusterctl delete 2 3 The `clusterctl delete` command deletes the provider components from the management cluster. 4 5 The operation is designed to prevent accidental deletion of user created objects. For example: 6 7 ```bash 8 clusterctl delete --infrastructure aws 9 ``` 10 11 This command deletes the AWS infrastructure provider components, while preserving 12 the namespace where the provider components are hosted and the provider's CRDs. 13 14 <aside class="note warning"> 15 16 <h1>Warning</h1> 17 18 If you want to delete the namespace where the provider components are hosted, you can use the `--include-namespace` flag. 19 20 Be aware that this operation deletes all the object existing in a namespace, not only the provider's components. 21 22 </aside> 23 24 <aside class="note warning"> 25 26 <h1>Warning</h1> 27 28 If you want to delete the provider's CRDs, and all the components related to CRDs like e.g. the ValidatingWebhookConfiguration etc., 29 you can use the `--include-crd` flag. 30 31 Be aware that this operation deletes all the objects of Kind's defined in the provider's CRDs, e.g. when deleting 32 the aws provider, it deletes all the `AWSCluster`, `AWSMachine` etc. 33 34 </aside> 35 36 If you want to delete all the providers in a single operation, you can use the `--all` flag. 37 38 ```bash 39 clusterctl delete --all 40 ``` 41 [issue 3119]: https://github.com/kubernetes-sigs/cluster-api/issues/3119