Prevent Deletion
Accidental deletion of virtual clusters is something that can not be reverted. In order to prevent deletion of virtual clusters, a setting can be enabled on the virtual cluster instance.
If you want to delete this virtual 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 virtual cluster as usual.
- Within the UI
- Within the YAML manifest
You can prevent virtual cluster deletion, by setting the annotation loft.sh/non-deletable: "true"
in the YAML manifest of the virtual 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-clusterth
From the project drop-down menu (top left corner), select the project you'd like to create the virtual cluster in.
Click on Virtual Clusters.
Click on Edit on the virtual cluster that you want to edit.
Navigate to Advanced section on the left.
Select the Enabled checkbox.
expander and tick theClick on the button to save the changes.