Creating a cluster network interface
Cluster Networks for VPC is available for select customers only. Contact IBM Support if you are interested in using this functionality.
You can create a cluster network interface either during the creation of a cluster network, or after the network has been provisioned.
Before you begin
Review Planning considerations and Known issues and limitations.
You can create a cluster network interface with the UI, CLI, API, or Terraform.
Creating a cluster network interface in the UI
To create a cluster network interface within a network cluster in the UI, follow these steps:
-
From your browser, open the IBM Cloud console and log in to your account.
-
Select the Navigation Menu , then click Infrastructure > Network > Cluster networks.
-
On the Cluster networks for VPC page, click the link of the cluster network name where you want to create an interface. The Overview page displays.
-
Click the Interfaces tab to show the Cluster network interfaces table, then click Create +.
-
Complete the information in the Create interface side panel, then click Create.
-
Enter an interface name.
-
Select the cluster network subnet.
A primary IP address is selected for you and is available to view after creation.
-
The cluster network interface is requested for use.
Creating a cluster network interface in the CLI
To create a cluster network interface in the CLI, follow these steps:
-
Enable the following feature flag:
export IBMCLOUD_IS_FEATURE_CLUSTER_NETWORK=true
-
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
-
To create a cluster network interface, enter the following command:
ibmcloud is cluster-network-interface-create CLUSTER_NETWORK (--rip RIP | (--rip-address RIP_ADDRESS --rip-auto-delete true | false --rip-name RIP_NAME)) [--subnet SUBNET] [--vpc VPC] [--name NAME] [--output JSON] [-q, --quiet]
Where:
CLUSTER_NETWORK
- ID or name for the cluster network.
--rip
- ID or name of the reserved IP to bind primary IP address to the cluster network interface.
--rip-address
- The IP address of the reserved IP to bind to the cluster network interface, which must not already be reserved on the subnet.
--rip-auto-delete
- Indicates whether this cluster network subnet reserved IP member will be automatically deleted when either target is deleted, or the cluster network subnet reserved IP is unbound. One of:
true
,false
. (default:true
). --rip-name
- The name of this cluster network subnet reserved IP.
--subnet
- ID or name for the subnet.
--vpc
- ID or name of the VPC. It is only required to specify the unique resource by name inside this VPC.
--name
- Name of the cluster network interface.
--output
- Specify output format, only JSON is supported. One of:
JSON
. -q
,--quiet
- Suppress verbose output.
Command examples
ibmcloud is cluster-network-interface-create my-cluster-network --name my-cluster-network-interface --subnet my-cluster-network-subnet --rip-name my-cluster-network-interface-reserved-ip
- Create reserved IP as part of interface creationibmcloud is cluster-network-interface-create my-cluster-network --name my-cluster-network-interface --rip my-cluster-network-interface-reserved-ip
- Use existing cluster network subnet reserved IP
Creating a cluster network interface with the API
To create a cluster network interface with the API, follow these steps:
-
Set up your API environment with the right variables.
-
Store any additional variables to be used in the API commands; for example:
version
(string): The API version, in formatYYYY-MM-DD
. -
When all variables are initiated, run the following command to create a cluster network interface:
curl -X POST "$vpc_api_endpoint/v1/cluster_networks/$cluster_network_id/interfaces?version=$today&generation=2" -H "Authorization: Bearer $iam_token" -d '{ "name": "my-cluster-network-interface", "subnet": { "id": "0767-7931845c-65c4-4b0a-80cd-7d9c1a6d7930" } }'
To view the complete set of cluster network APIs, see the VPC API reference.