Configuring a Cluster with Public Endpoints
Sign up for Confluent Cloud if you have not already done so and respond to the verification email to confirm your account.
Log into Confluent Cloud.
- Create an Environment called “Cloud-Networking.”
- Click Create a cluster on my own, select a Basic cluster, and Begin configuration.
- Select AWS as the cloud provider, then select a region and leave availability as Single zone, and click Continue.
- Give the cluster the name “Public Endpoint Cluster” and click Launch cluster.
- Review the cluster networking. Click let me explore. Click Cluster overview, Networking.
Test connecting a client to a public cluster.
- First, get some data into a topic. We can use the Datagen source connector for this purpose. Click on Data integration, and Connectors.
- Next, search for the Datagen Connector and select it.
- Now create a topic by clicking Add a new topic, name the topic clickstream, and then click Create with defaults.
- Select the newly created topic and click Continue.
- For purposes of this demo, you will enable global access for our connector. In production, it is recommended to use service accounts and specify granular access. Be sure to save the API key and secret pair to a safe place as you will need it later. Click Generate API key and Download.
- Once you have the credential saved, click continue. Choose the Clickstream template and the output format of JSON and click Continue.
- Choose one task for the connector and click Continue.
- Leave the name as the default and click Launch.
Set up a cloud environment to test connectivity.
- Log in to AWS console and Create a VPC.
Launch an EC2 instance in the VPC, for simulating client traffic.
- Name the instance and select the Ubuntu AMI.
- Select a Key pair. You may first need to create one if you haven’t previously done so.
- Under Network settings, select the networking course VPC that was just created, a public subnet, and a security group that allows SSH access from your local workstation.
- After completing the EC2 instance configuration, click Launch instance.
- Associate an Elastic IP address with your EC2 instance so you can ssh in and configure it from your local workstation.
confluent CLI to consume the records.
- Click CLI and Tools, then follow the instructions to install the CLI on your EC2 instance.
- Set the environment and cluster, and store the API key for use in consumption.
- Consume the clickstream data from your public endpoint cluster.
- Delete the Datagen Connector by going to Data Integration -> Connectors, selecting the connector, and clicking delete. Confirm the deletion by entering the name of the connector.
- Delete the API keys by clicking Data Integration -> API Keys. Select the API Key you created, click delete API key, and confirm the deletion.
- Delete the cluster. Click Cluster Overview -> Cluster Settings, then delete cluster. Enter the cluster name to confirm the deletion.