This topic shows you how to purchase and deploy a Message Queue for Apache Kafka instance that allows access from the Internet and 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 Internet and 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.

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. Select an option for the Custom Username and Password parameter.
      • Yes: If you select this option, customize the username and password. This option applies to scenarios where multiple instances share the same username and password.
      • No: If you select this option, the default username and password that Message Queue for Apache Kafka assigns to each instance are used.
    5. Click Deploy.
    The instance enters the Deploying state. The instance deployment takes about 10 to 30 minutes.

Step 4: View instance details

  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 details you want to view.
  2. On the Instance Details page, view the endpoints, username, and password of the instance.
    1. In the Endpoint Information section of the Instance Information tab, view the endpoints of the instance. For more information about how to select an endpoint, see Comparison among endpoints.
      • The default endpoint and Simple Authentication and Security Layer (SASL) endpoint are used for access from the VPC.
      • The SSL endpoint is used for access over the Internet.
    2. In the Configuration Information section of the Instance Information tab, view the Username and Password of the instance.

Step 5: Configure a whitelist 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 SSL endpoint of the Message Queue for Apache Kafka instance over the Internet. In this case, run the telnet 192.51.XX.XX 9093.
If success is returned for the telnet command, the network connection is normal. test

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