Prevent Deletion
Accidental deletion of clusters is something that can not be reverted. In order to prevent deletion of clusters, a setting can be enabled on the cluster instance.
If you want to delete this cluster in the future, you need to remove the label either in the YAML manifest or through the toggle in the UI. Once you have done this, you can delete the cluster as usual.
- Within the UI
- Within the YAML manifest
You can prevent cluster deletion, by setting the annotation loft.sh/non-deletable: "true" in the YAML manifest of the cluster instance.
apiVersion: management.loft.sh/v1
kind: VirtualClusterInstance
metadata:
name: my-vcluster
annotations:
loft.sh/non-deletable: "true"
spec:
templateRef:
name: isolated-vcluster
clusterRef:
cluster: loft-cluster
From the project drop-down menu (top left corner), select the project you'd like to create the cluster in.
Click Clusters.
Click the option for the cluster you want to modify.
Navigate to Advanced section on the left.
Select the expander and enable Enabled.
Click the button to save the changes.