Uninstalling an Open Horizon agent

To uninstall an agent from IBM® Hybrid Cloud Mesh (Mesh), you must first delete the Red Hat® Service Interconnect gateway that is linked to the agent, then use the palmctl CLI to uninstall.

About this task

To uninstall an Open Horizon agent, you must complete the following tasks:

  1. Disconnect the Red Hat Service Interconnect gateway from the namespace.
  2. Delete the gateway.
  3. Uninstall the Open Horizon agent.

Procedure

  1. On the Gateways page in the Mesh console, click the Red Hat Service Interconnect gateway that is linked to the agent.
  2. In the Connected namespaces section, click the namespace where the gateway is running.
  3. On the Namespace details page, click Edit Edit icon.
  4. Click Disconnect, then click Next. Then click Save changes to disconnect the gateway from the namespace.
  5. In the Health field on the Gateways page, check the status of the gateway.
    When the gateway has a Not deployed status, you can delete the gateway.
  6. On the Edge gateway details page, click Delete gateway.
    When the gateway is deleted, the following notification is displayed:
    The <gateway name> was successfully deleted.
  7. Check that the gateway is deleted.
    For example, use the palmctl CLI to run a command like this:
    palmctl get gateway --name gw1
    If the gateway was successfully deleted, output that is similar to the following example is displayed:
    [ERROR] gateway with name gw1 not found

    You can now uninstall the current agent.

  8. Use the palmctl CLI to uninstall the agent. Run the following command:
    palmctl uninstall openhorizon --namespace <agent_namespace>
    <agent_namespace> is the namespace that the agent is installed in.
  9. Check that the agent is uninstalled by running a command like this:
    In a Kubernetes environment:
    kubectl get deployment -n <agent_namespace> agent
    In an OpenShift® Container Platform environment:
    oc get deployment -n <agent_namespace> agent
    If the agent is successfully uninstalled, the output looks like this:
    Error from server (NotFound): deployments.apps "agent" not found