Confluent Cloud

Get started with Lenses. Set it up with Docker and connect to a Confluent Cloud, managed Kafka with the standard configuration.

1. Get your Lenses access key

Sign up with Lenses and download your access key.

2. Sign up for Confluent Cloud and create a Kafka

Confluent Cloud Apache Kafka is a fully managed streaming platform, deployable in the cloud of your choice.

Start by signing up for a Confluent Cloud account . Follow the in-product instructions to launch Kafka clusters within the Confluent Cloud user interface.

Confluent Cloud

Then, enable remote access by creating API keys.

Create 2 API keys

  1. Kafka API key. Go to API access.

    Create a Kafka API key

  2. Schema Registry API key. Go to your environment. > Settings > Schema Registry API access

    Create a Schema Registry API key

Gather 2 connection points

  1. Kafka endpoint. Go to Cluster settings
Kafka endpoint
  1. Schema Registry endpoint. Go to your environment. > Settings > Schema Registry API access
Schema Registry endpoint

3. Get Docker

You will use docker-compose to spin up Lenses.

Start by signing up with Docker . Then install docker-compose .

Install Docker

4. Setup Lenses docker-compose

Use this docker-compose.yml file to spin up Lenses and connect to your Confluent Cloud Kafka.

Just 2 steps:

  1. Fill in the connection details:
    1. Kafka endpoint
    2. Schema Registry
  2. Share the authentication files with your docker. Copy these files in the same directory as your docker-compose.yml file and reference them:
    1. Your Lenses license key license.json

The file:

version: '3'
services:
  lenses:
    image: lensesio/lenses
    environment:
      # Admin user credentials
      LENSES_SECURITY_USER: admin
      LENSES_SECURITY_PASSWORD: admin
      LENSES_PORT: 80
      
      # === Set your values in this section ===
      
      # ===Step 1=== Put your Confluent Cloud Kafka 'Service URI' here
      # e.g. 
      # LENSES_KAFKA_BROKERS: SASL_SSL://pkc-41wq6.eu-west-2.aws.confluent.cloud:9092
      # Kafka Endpoint
      LENSES_KAFKA_BROKERS: SASL_SSL://[CC_HOST]:[CC_PORT]
      # Confluent Cloud SASL_SSL configuration
      LENSES_KAFKA_SETTINGS_CLIENT_SECURITY_PROTOCOL: SASL_SSL
      LENSES_KAFKA_SETTINGS_CLIENT_SASL_MECHANISM: PLAIN
  
      # ===Step 2=== Put the Kafka API key and secret here for the Kafka Client to access Confluent Cloud
      FILECONTENT_JAAS: |
        KafkaClient {
          org.apache.kafka.common.security.plain.PlainLoginModule required
          username="[KAFKA_API_KEY]"
          password="[KAFKA_API_SECRET]"
          serviceName=kafka;
        };

      
      # ===Step 3=== Put the Confluent Cloud Schema Registry endpoint, key and secret here
      # Confluent Cloud Schema Registry
      LENSES_SCHEMA_REGISTRY_URLS: '[{url: "https://[REGISTRY_HOST]:[REGISTRY_PORT]"}]'
      LENSES_SCHEMA_REGISTRY_AUTH: USER_INFO
      LENSES_SCHEMA_REGISTRY_USERNAME: [SR_API_KEY]
      LENSES_SCHEMA_REGISTRY_PASSWORD: [SR_API_SECRET]
      LENSES_KAFKA_SETTINGS_CLIENT_BASIC_AUTH_CREDENTIALS_SOURCE: USER_INFO
      LENSES_KAFKA_SETTINGS_CLIENT_BASIC_AUTH_USER_INFO: [SR_API_KEY]:[SR_API_SECRET]

    ports:
      - 80:80
    volumes:
      # ===Step 4=== Share your authentication files here
      # Map the Lenses license key file here to activate Lenses
      - ./license.json:/license.json

5. Start Lenses up

docker-compose up

6. Login

User:     admin
Password: admin

7. Eureka!

Lenses Dashboard

8. Next steps

Learn the basics.

Limitations

Confluent Cloud only exposes certain, limited endpoints. These endpoints are not available:

  • No Kafka metrics via JMX
  • No Kafka Connect endpoint

Without these endpoints these Lenses features are not available: