How to delete a managed controller in CloudBees CI

Article ID:360028845191
Last Reviewed:2025-08-06()
2 minute readKnowledge base

Issue

  • A managed controller is no longer needed or was accidentally created and needs to be deleted.

Resolution

When deleting a Managed controller, its storage volume might not be automatically deleted. If the JVM argument -Dcom.cloudbees.masterprovisioning.kubernetes.KubernetesMasterProvisioning.deleteClaim=true is set in the Operations center, deleting the Managed controller will automatically delete the related storage volume objects, such as the Persistent Volume Claim and Persistent Volume. Having this JVM argument set as true will delete the storage objects regardless of the related Storage Class’s Reclaim Policy value.

The default behavior when deleting a controller is to retain the controller’s PVC and PV. This is the behavior even if the Storage Class’s Reclaim Policy is set to Delete.

If the above JVM argument is not set, in order to completely delete a Managed controller, follow these steps:

=== Before deleting any Managed controller, we always recommend taking a backup of the controller or cluster just in case something goes wrong. ===

First, delete the Managed controller from the Operations center web interface.

  1. Find the Managed controller item in the Operations center

    cjoc-controller-item-arrow.png
  2. Click the black arrow next to the name, navigate to Manage, and select Deprovision.

    cjoc-controller-dropdown-manage.png
  3. Click Delete on the left sidebar after the controller is deprovisioned.

    cjoc-controller-manage-delete.png

Next, delete the storage volume for the Managed controller. This will require delete permissions for the the platform you are running CloudBees CI on.

=== If you are running CloudBees CI on Kubernetes: Run the command kubectl delete persistentvolumeclaim/jenkins-home-<CONTROLLER_NAME>-0 --namespace <NAMESPACE> (This command will differ slightly based on naming conventions) ===
=== If you are running CloudBees CI on a different platform, such as AWS or locally on your own server cluster, the process to delete the storage volume will be different. Please consult with your platform administrator on how to delete a storage volume. ===