How to delete a Managed controller in CloudBees Jenkins Enterprise and CloudBees CI (CloudBees Core)

Article ID:360028845191
2 minute readKnowledge base

Issue

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

Environment

Resolution

When deleting a Managed controller, its storage volume may not be automatically deleted. This depends on how the cluster and the environment are configured. For example, when using Jenkins in Kubernetes, if this Jenkins argument is set -Dcom.cloudbees.masterprovisioning.kubernetes.KubernetesMasterProvisioning.deleteClaim=false and the Reclaim Policy on the Storage Class is set to Retain then the volume should still exist after the Managed controller is deleted in the web interface.

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

In order to completely delete a Managed controller, follow these steps:

First, delete the Managed controller from the CloudBees Jenkins Operations Center web interface

  1. Find the Managed controller item in the CloudBees Jenkins Operations Center

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

    cjoc-controller-dropdown-manage.png
  3. Click Disconnect and then Delete on the left sidebar

    cjoc-controller-manage-disconnect-delete.png

Next, delete the storage volume for the Managed controller. This will require admin access for the platform you are running Jenkins on.

  • If you are running Jenkins on Kubernetes: Run the command kubectl delete persistentvolumeclaim/jenkins-home-<MASTER_NAME> (This command will differ slightly based on naming conventions)

  • If you are running Jenkins 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.