IBM Cloud Docs
Deleting a cluster network

Deleting a cluster network

Cluster Networks for VPC is available for select customers only. Contact IBM Support if you are interested in using this functionality.

You can delete a cluster network interface after all instances attached to it are deleted.

Before you begin

Review Planning considerations and Known issues and limitations.

You can delete a cluster network with the UI, CLI, API, or Terraform.

Deleting a cluster network in the UI

To delete a cluster network in the IBM Cloud console, follow these steps:

  1. From your browser, open the IBM Cloud console and log in to your account.

  2. Select the Navigation Menu Navigation Menu icon, then click Infrastructure VPC icon > Cluster networks.

  3. In the Cluster networks for VPC table, locate the cluster network interface that you want to delete, then click Delete in the Actions menu Actions menu.

    Alternatively, you can Delete a cluster network from the Actions menu on the cluster network's details page.

Deleting a cluster network in the CLI

To delete a cluster network in the CLI, follow these steps:

  1. Set up your CLI environment.

  2. Enable the following feature flag:

    export IBMCLOUD_IS_FEATURE_CLUSTER_NETWORK=true
    
  3. Log in to your account with the CLI. After you enter the password, the system prompts for the account and region that you want to use:

    ibmcloud login --sso
    
  4. To delete one or more cluster networks, enter the following command:

    ibmcloud is cluster-network-delete (CLUSTER_NETWORK1 CLUSTER_NETWORK2...) [--output JSON]  [-f, --force] [-q, --quiet]
    

    Where:

    CLUSTER_NETWORK1 CLUSTER_NETWORK2
    IDs or names of the cluster networks, separated by a space.
    -output
    Specify output format, only JSON is supported. One of: JSON.
    -force, -f
    Force the operation without confirmation.
    -q, --quiet
    Suppress verbose output.

Command example

To delete cluster network cli-cn-1. You are prompted for confirmation. This action cannot be undone.

ibmcloud is cluster-network-delete cli-cn-1

Deleting a cluster network with the API

To delete a cluster network with the API, follow these steps:

  1. Set up your API environment with the right variables.

  2. Store any additional variables to be used in the API commands; for example:

    version (string): The API version, in format YYYY-MM-DD.

  3. When all variables are initiated, run the following command delete the cluster network:

    curl -X DELETE   "$vpc_api_endpoint/v1/cluster_networks/$cluster_network_id?version=$tomorrow&generation=2&maturity=development" -H "Authorization: Bearer $iam_token"
    

To view the complete set of cluster network APIs, see the VPC API reference.