Uninstalling

Find out how to remove Event Manager and Event Gateway instances.

You can also remove the Event Endpoint Management operator itself.

Uninstalling instances

Using the OpenShift Container Platform web console

To delete an Event Manager instance:

  1. Log in to the OpenShift Container Platform web console using your login credentials.
  2. Expand the Operators dropdown and select Installed Operators to open the Installed Operators page.
  3. Expand the Project dropdown and select the project the instance is installed in. Click the operator called IBM Event Endpoint Management.
  4. In the Operator Details panel, select the Event Endpoint Management tab to show the Event Manager instances in the selected namespace.
  5. Click More options icon More options next to the instance to be deleted to open the actions menu.
  6. Click the Delete EventEndpointManagement menu option to open the confirmation panel.
  7. Check the namespace and instance name and click Delete to shutdown the associated pods and delete the instance.

To delete an Event Gateway instance in an OpenShift cluster:

  1. Log in to the OpenShift Container Platform web console using your login credentials.
  2. Expand the Operators dropdown and select Installed Operators to open the Installed Operators page.
  3. Expand the Project dropdown and select the project the instance is installed in. Click the operator called IBM Event Endpoint Management.
  4. In the Operator Details panel, select the Event Gateway tab to show the Event Gateway instances in the selected namespace.
  5. Click More options icon More options next to the instance to be deleted to open the actions menu.
  6. Click the Delete EventGateway menu option to open the confirmation panel.
  7. Check the namespace and instance name, and then click Delete to shutdown the associated pods and delete the instance.

Check uninstallation progress

  1. Log in to the OpenShift Container Platform web console using your login credentials.
  2. Expand the Workloads dropdown and select Pods to open the Pods dashboard.
  3. Click Select All Filters to display pods in any state.
  4. Enter the name of the Event Manager instance being deleted in the Filter by name box.
  5. Wait for all the Event Endpoint Management pods to be displayed as Terminating and then be removed from the list.

Removing persistence resources

If you had enabled persistence for the Event Manager instance but set the deleteClaim storage property to false, you will need to manually remove the associated Persistent Volumes (PVs) and Persistent Volume Claims (PVCs) that were created at installation time.

The deleteClaim property is configured in the EventEndpointManagement custom resource and can be set to true during installation to ensure the PVs and PVCs are automatically removed when the instance is deleted.

You can find this property under spec.<component_name>.storage.deleteClaim.

Important: This change will cause data to be removed during an upgrade.

To remove any remaining storage, delete the PVCs first, and then delete any remaining PVs as follows.

Delete the Persistent Volume Claims (PVCs):

  1. Log in to the OpenShift Container Platform web console using your login credentials.
  2. Expand the Storage dropdown and select Persistent Volume Claims to open the Persistent Volume Claims page.
  3. In the Project dropdown select the required namespace.
  4. Click Select All Filters to display PVCs in any state.
  5. Enter the name of the Event Manager instance in the Filter by name box.
  6. For each PVC to be deleted, make a note of the Persistent Volume listed for that PVC and then click More options icon More options to open the actions menu.
  7. Click the Delete Persistent Volume Claim menu option to open the confirmation panel.
  8. Check the PVC name and namespace, then click Delete to remove the PVC.

Delete remaining Persistent Volumes (PVs):

  1. Log in to the OpenShift Container Platform web console using your login credentials.
  2. Expand the Storage dropdown and select Persistent Volumes to open the Persistent Volumes page.
  3. In the Project dropdown select the required namespace.
  4. For each PV you made a note of when deleting PVCs, click More options icon More options to open the actions menu.
  5. Click the Delete Persistent Volume menu option to open the confirmation panel.
  6. Check the PV name and click Delete to remove the PV.

Using the CLI

You can delete an Event Manager instance using the kubectl command-line tool:

  1. Log in to your Kubernetes cluster as a cluster administrator by setting your kubectl context.
  2. Ensure you are in the namespace where your Event Manager instance is installed:

    kubectl config set-context --current --namespace=<namespace>
    
  3. Run the following command to display the Event Manager instances:

    kubectl get eventendpointmanagement
    
  4. Run the following command to delete your instance:

    kubectl delete eventendpointmanagement --selector app.kubernetes.io/instance=<instance_name>
    

To delete an Event Gateway instance using the kubectl command-line tool:

  1. Log in to your Kubernetes cluster as a cluster administrator by setting your kubectl context.
  2. Ensure you are in the namespace where your Event Gateway instance is installed:

    kubectl config set-context --current --namespace=<namespace>
    
  3. Run the following command to display the Event Gateway instances:

    kubectl get eventgateway
    
  4. Run the following command to delete your instance:

    kubectl delete eventgateway --selector app.kubernetes.io/instance=<instance_name>
    

Check uninstallation progress

Run the following command to check the progress:

kubectl get pods --selector app.kubernetes.io/instance=<instance_name>

Pods will initially display a STATUS Terminating and then be removed from the output as they are deleted.

$ kubectl get pods --selector app.kubernetes.io/instance=minimal-prod
>
NAME                                                 READY     STATUS        RESTARTS    AGE
minimal-prod-ibm-eem-manager-0                       0/1       Terminating   0           10s
minimal-prod-gw-ibm-egw-gateway-664b4f8998-52bqc     0/1       Terminating   0           15h

Removing persistence resources

If you had enabled persistence for the Event Manager instance but set the deleteClaim storage property to false, you will need to manually remove the associated Persistent Volumes (PVs) and Persistent Volume Claims (PVCs) that were created at installation time.

The deleteClaim property is configured in the EventEndpointManagement custom resource and can be set to true during installation to ensure the PVs and PVCs are automatically removed when the instance is deleted.

Note: You do not need to configure deleteClaim property for the EventGateway custom resource. Event Gateway instance does not have any PVs and PVCs.

You can find this property under spec.<component_name>.storage.deleteClaim.

Important: This change will cause data to be removed during an upgrade.

To remove any remaining storage, delete the PVCs first, and then delete any remaining PVs as follows.

Delete the PVCs:

  1. Run the following command to list the remaining PVCs associated with the deleted instance:

    kubectl get pvc --selector app.kubernetes.io/instance=<instance_name>
    
  2. Run the following to delete a PVC:

    kubectl delete pvc <pvc_name>
    

Delete remaining PVs:

  1. Run the following command to list the remaining PVs:

    kubectl get pv
    
  2. Run the following command to delete any PVs that were listed in the Volume column of the deleted PVCs:

    kubectl delete pv <pv_name>
    

Note: Take extreme care to select the correct PV name to ensure you do not delete storage associated with a different application instance.

Uninstalling the Event Endpoint Management operator

On the OpenShift Container Platform

To delete the Event Endpoint Management operator:

  1. Log in to the OpenShift Container Platform web console using your login credentials.
  2. Expand the Operators dropdown and select Installed Operators to open the Installed Operators page.
  3. In the Project dropdown select the required namespace. For cluster-wide operators, select the openshift-operators project.
  4. Click More options icon More options next to the Event Endpoint Management operator to be deleted to open the actions menu.
  5. Click the Uninstall Operator menu option to open the confirmation panel.
  6. Check the namespace and operator name, then click Remove to uninstall the operator.

On other Kubernetes platforms

To delete the Event Endpoint Management operator:

  1. Log in to your Kubernetes cluster as a cluster administrator by setting your kubectl context.
  2. Ensure you are in the namespace where your Event Endpoint Management operator is installed:

    kubectl config set-context --current --namespace=<namespace>
    
  3. List your Helm releases and select the release that matches the operator:

    helm list
    
  4. Uninstall the operator by using the following command:

    helm uninstall <release-name>
    

Removing Event Endpoint Management Custom Resource Definitions

On the OpenShift Container Platform

The Event Manager and Event Gateway Custom Resource Definitions (CRDs) are not deleted automatically. You must manually delete any CRDs that you do not want:

To delete Event Endpoint Management CRDs:

  1. Log in to the OpenShift Container Platform web console using your login credentials.
  2. Expand Administration and click CustomResourceDefinitions.
  3. Enter EventEndpointManagement in the Filter by name box to filter the CRDs associated with the Event Manager.
  4. Click More options icon More options next to the CRD to be deleted to open the actions menu.
  5. Click the Delete CustomResourceDefinition menu option to open the confirmation panel.
  6. Check the name of the CRD and click Delete to remove the CRD.

To delete Event Gateway CRDs:

  1. Log in to the OpenShift Container Platform web console using your login credentials.
  2. Expand Administration and click CustomResourceDefinitions.
  3. Enter EventGateway in the Filter by name box to filter the CRDs associated with the Event Gateway.
  4. Click More options icon More options next to the CRD to be deleted to open the actions menu.
  5. Click the Delete CustomResourceDefinition menu option to open the confirmation panel.
  6. Check the name of the CRD and click Delete to remove the CRD.

On other Kubernetes platforms

The Event Manager and Event Gateway Custom Resource Definitions (CRDs) are not deleted automatically. You must manually delete any CRDs that you no longer require. Take caution when deleting CRDs and check there are no instances of the CRDs, or other operator installations that use the CRDs.

  1. Log in to your Kubernetes cluster as a cluster administrator by setting your kubectl context.
  2. Identify the namespace and Helm release managing the CRDs by looking at the annotations on the CRDs:

    kubectl get crd eventendpointmanagements.events.ibm.com -o jsonpath='{.metadata.annotations}'
    

    Example output showing CRDs managed by Helm release “eem-crds” in namespace “my-eem”

    {"meta.helm.sh/release-name": "eem-crds", "meta.helm.sh/release-namespace": "eem"}
    
  3. Ensure you are using the namespace where your Event Endpoint Management CRD Helm release is located (see previous step).

    kubectl config set-context --current --namespace=<namespace>
    
  4. To check for other Event Manager instances, use the following two commands:

    kubectl get eventendpointmanagement --all-namespaces
    
    kubectl get eventgateway --all-namespaces
    
  5. To check for other Event Endpoint Management operator installations:

    kubectl get pods -l app.kubernetes.io/instance=ibm-eem-operator --all-namespaces
    
  6. When ready, you can delete the CRDs:

    helm uninstall <release name>
    

Uninstalling the IBM Cert Manager on OpenShift Container Platform

To delete the IBM Cert Manager operator:

  1. Log in to the OpenShift Container Platform web console using your login credentials.
  2. Expand the Operators dropdown and select Installed Operators to open the Installed Operators page.
  3. In the Project dropdown select the required namespace. For cluster-wide operators, select the openshift-operators project.
  4. Click More options icon More options next to the IBM Cert Manager operator that is to be deleted to open the actions menu.
  5. Click the Uninstall Operator menu option to open the confirmation panel.
  6. Check the namespace and operator name, then click Remove to uninstall the operator.

Removing certificate secrets

Secrets that are created by the Cert Manager are not deleted automatically. You must manually delete any secrets that you do not want.

Using the OpenShift Container Platform web console

To delete Event Manager and Event Gateway secrets by using the web console:

  1. Log in to the OpenShift Container Platform web console using your login credentials.
  2. Expand the Workloads dropdown and select Secrets to open the Secrets dashboard.
  3. The secrets created for Event Manager and Event Gateway begin with the name of your Event Manager and Event Gateway instances.
  4. Search the instance by name and click More options icon More options next to the secret to be deleted to open the actions menu.
  5. Click the Delete Secret menu option to open the confirmation panel.
  6. Check the name of the secret and click Delete to remove the secret.

Using the CLI

To delete Event Manager and Event Gateway secrets by using the CLI:

  1. Log in to your Kubernetes cluster as a cluster administrator by setting your kubectl context.
  2. Ensure you are using the namespace where your Event Endpoint Management operator was located:

    kubectl config set-context --current --namespace=<namespace>
    
  3. List the secrets and identify any that match the instance you deleted. The secrets created for Event Manager and Event Gateway begin with the name of your Event Manager and Event Gateway instances.

    kubectl get secrets
    
  4. Delete the relevant secrets:

    kubectl delete secret <secretName>
    

Uninstalling a stand-alone Event Gateway

To remove a stand-alone Event Gateway:

  1. Run the following command to list the running containers:

    docker ps
    
  2. Locate the stand-alone gateway in the list and stop the gateway container:

    docker stop <container_id>
    
  3. After the container is stopped, delete the stand-alone gateway container and image:

    docker rm <stand-alone-gateway_container>
    
    docker rmi <stand-alone-gateway_image_name>