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 cluster. You must follow these steps for each Kubernetes namespace 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 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 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 kubectl CLI. Navigate to your namespace:

kubectl config set-context --current --namespace=<NAMESPACE>

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 kubectl 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 kubectl CLI.

  2. Use the CLI to set the context to the namespace that you created for your blockchain network:

   kubectl config set-context --current --namespace=<NAMESPACE>
  1. You can remove the operator deployment using the kubectl 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 Kubernetes cluster, you can delete your namespace.

kubectl delete namespaces <NAMESPACE>

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 namespace removes the IBM Blockchain Platform Security Context Constraint, clusterRole, and ClusterRoleBinding that you applied. It also 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.