Removing your deployment

Important: You are not looking at the latest product documentation. Make sure you are reading the documentation that matches the version of the software that you are using. Switch to product version 2.1.3, 2.5, 2.5.1, 2.5.2 (latest)

The IBM® Blockchain Platform operator automatically restarts your blockchain nodes or your console if they stop or crash. As a result, you cannot manually remove your blockchain components by manually deleting their pods. Use the following steps to remove the IBM Blockchain Platform from your OpenShift cluster. You must follow these steps for each OpenShift project that you create.

If your organization is participating in an active blockchain network, you should remove your organization from the network before you remove your deployment. See Removing an organization for more details.

Step one: Use the console to delete your blockchain nodes

You can use your console to remove your blockchain node and any accompanying artifacts from your OpenShift cluster. These artifacts include your ledger data in persistent storage and the keys that are stored in Kubernetes secrets. Log in to your console and go to the node overview page. Click the Delete under the node name and enter the node name on the slider to permanently remove the node from the cluster. Note that you can delete a node only by using the console that created the node. You cannot use your console to delete nodes that are deployed on other clusters. You can also delete nodes by using the IBM Blockchain Platform APIs.

If you cannot use your console or the APIs to remove your nodes, you can manually remove all of the nodes from your cluster by using the OpenShift CLI. Navigate to your OpenShift Project:

oc project <PROJECT_NAME>

Then run the following commands to delete all of your blockchain nodes:

kubectl delete ibpca --all
kubectl delete ibppeer --all
kubectl delete ibporderer --all

Step two: Delete the IBM Blockchain Platform operator

You can use the OpenShift CLI to remove the IBM Blockchain Platform operator. When the operator is no longer running on your cluster, you can delete the console and any remaining nodes without them being restarted.

  1. Log in to your cluster by using the OpenShift CLI. If you are using the OpenShift web console, you can log in to your cluster by clicking the dropdown menu in the upper right corner and then clicking Copy Login Command. Paste the copied command in your command terminal.

  2. Use the CLI to switch to the OpenShift project that you created for your blockchain network:

   oc project <PROJECT_NAME>
  1. You can remove the operator deployment using the OpenShift CLI:

    kubectl delete deployment ibp-operator
    

Step Three: Delete the IBM Blockchain Platform console

After you remove the operator, you can then delete the console without it being restarted. When you are logged in to your cluster and are operating from your project, you can delete the console by issuing the following command:

kubectl delete ibpconsole --all

Step Four: Remove policies and secrets

If you are done working with the IBM Blockchain Platform on your OpenShift cluster, you can delete your OpenShift project.

oc delete project <PROJECT_NAME>

This command deletes any remaining blockchain nodes that are running on the project, in addition to your console and the IBM Blockchain Platform operator.

Deleting the OpenShift project removes the IBM Blockchain Platform Security Context Constraint, clusterRole, and ClusterRoleBinding that you applied. It deletes the secrets that you created. You cannot undo this action. As a result, deleting your project is not recommended unless you are not going to deploy another instance of the platform.