Deleting Service Interconnect edge gateways with the CLI

Use the IBM® Hybrid Cloud Mesh (Mesh) CLI to delete Red Hat® Service Interconnect® gateways from your deployment environment.

About this task

If the gateway is deployed, you must first unlink the gateway from the namespace before you can delete the gateway.
Warning: When you try to delete a gateway that is linked to a namespace, the gateway is not deleted.

Procedure

  1. To unlink the gateway from the namespace, run a patch command like this:
    cat << EOM | palmctl patch namespace --name <namespace_name> --cloud-name <cloud_name> --cluster-name <cluster_name> -f -
    gateway_id: ""
    EOM
  2. Watch the health status of your gateway by running a command like this:
    watch -n 1 "palmctl get gateway --name <gateway_name> | yq  '.health_status'"

    Before you proceed to step 3, you must wait until the health status of the gateway shows as notdeployed.

  3. Delete the gateway by running a command like this:
    palmctl delete gateway --name <gateway_name>
    Note: The deletion of a gateway can take several minutes. Do not do any operations on the gateway in the CLI until the gateway is deleted.
  4. To verify that the gateway is deleted, run a command like this:
    watch -n 1 "palmctl get gateway --name <gateway_name>"

    If the gateway was successfully deleted, output that is similar to the following example is shown:

    [ERROR] gateway with name <gateway_name> not found