This topic shows you how to purchase and deploy a Message Queue for Apache Kafka instance that allows access only from a virtual private cloud (VPC). After you purchase a Message Queue for Apache Kafka instance, you cannot change the selected network type.

Prerequisites

Step 1: Purchase a Message Queue for Apache Kafka instance

  1. Log on to the Message Queue for Apache Kafka console.
  2. In the Resource Distribution section of the Overview page, select the region where your instance resides.
  3. On the Instances page, click Buy Instance.
  4. In the Select Instance Billing Method panel, set the Billing Method parameter to Subscription or Pay-as-you-go as required and click OK. In this example, select the subscription billing method.
  5. On the buy page, set the Network parameter to VPC, configure other settings based on your business requirements, and then click Buy Now. On the page that appears, complete the payment by following the on-screen instructions.

Step 2: Obtain the VPC information

  1. Log on to the VPC console.
  2. In the top navigation bar, select the region where the VPC is deployed.
  3. In the left-side navigation pane, click vSwitch.
  4. On the vSwitch page, view the vSwitch ID and VPC ID.
    • The Instance ID/Name column lists vSwitch IDs.
    • The VPC column lists VPC IDs.

Step 3: Deploy the Message Queue for Apache Kafka instance

  1. In the Message Queue for Apache Kafka console, click Instances in the left-side navigation pane. On the Instances page, find the instance that you want to deploy and click Deploy in the Actions column. Make sure that the instance is in the Not Deployed state.
  2. In the Deploy Instance panel, deploy the instance.
    1. From the VPC ID drop-down list, select your VPC ID.
    2. From the vSwitch ID drop-down list, select your vSwitch ID.
      After you select the vSwitch ID, Message Queue for Apache Kafka automatically selects the zone where the vSwitch is located.
    3. Optional:If the instance edition is Professional Edition, you can select whether to deploy the instance across zones.
      Cross-zone instances can provide high disaster recovery capabilities and withstand breakdowns in data centers.
    4. Click Deploy.
    The instance enters the Deploying state. The instance deployment takes about 10 to 30 minutes.

Step 4: View the endpoints of the instance

  1. In the Message Queue for Apache Kafka console, click Instances in the left-side navigation pane. On the Instances page, click the name of the instance whose endpoints you want to view.
  2. On the Instance Details page, view the endpoints of the instance in the Endpoint Information section of the Instance Information tab. For more information about how to select an endpoint, see Comparison among endpoints.

Step 5: Configure the whitelist of an endpoint and test network connectivity

Enable Telnet on your local client and run the telnet IP address of the endpoint port number command to check whether you can connect to Message Queue for Apache Kafka.
For example, the client connects to the default endpoint of the Message Queue for Apache Kafka instance. In this case, run the telnet 192.168.XX.XX 9092.
If success is returned for the telnet command, the network connection is normal. VPC

If an exception occurs when the instance is running, use the self-check tool to perform self-check. For more information, see Perform health self-check on instances.

What to do next

Step 3: Create resources