Installing Community Edition Using Helm

These instructions are NOT for production environments. They are intended for dev or test environment setups. Please see here for details on installing Lenses for more secure environments.

Tool Requirements

  1. Kubernetes cluster and kubectl - you can use something like Minikube or Docker Desktop in Kubernetes mode if you'd like, but you will need to allocate at least 8 gigs of RAM and 6 CPUs

  2. Helm.

  3. Text editor.

  4. Kafka cluster and a Postgres database(we will provide setup instructions below for this if it's not already installed.)

  5. Kafka Connect and a schema registry (optional)

Adding Required Helm Repositories

From a workstation with kubectl and Helm installed, add the Lenses Helm repository:

helm repo add lensesio https://helm.repo.lenses.io/

If you don't already have a Kafka cluster or Postgres installed you will need to add this repository as well:

helm repo add bitnami https://charts.bitnami.com/bitnami

Once you've added them, run the following command:

helm repo update

Installing Postgres - if needed

If you already have Postgres installed skip to the next section: Configuring Postgres

  1. Create a namespace for Postgres

  1. Create a PVC claim for Postgres

PLEASE NOTE: PVC claims vary greatly depending on the type of Kubernetes cluster you are using. Here we are using a "standard" storage class. Please refer to your version of Kubernetes' docs for the best storage class to use.

Save the above to a file called postgres-pvc.yaml and then run the following command:

  1. Install Postgres using the Bitnami Helm chart.

Using simple cleartext passwords like in the below example is NEVER recommended for anything other than a test or dev environment.

Save the above text to a file called postgres-values.yaml. Then run the following command:

Verify that Postgres is up and running. It may take a minute or so to download and be fully ready.

Verifying Postgres is running.

Configuring Postgres

Again a reminder, we are using simple cleartext passwords here. NEVER recommended for anything other than test or dev environments.

  1. We need to create the databases in Postgres for Lenses to use.

Option 1: You will need to use a Postgres client to run the following commands.

Log in to your Postgres instance and run the following commands:

Option 2: Use a Kubernetes job to run the Postgres commands.

Lenses needs a database for LensesHQ and for Lenses Agent. This job will create one for each using the same Postgres instance.

Copy the above text to a file called lenses-db-init-job.yaml and then run the following command:

Wait a bit and then run

You should see

1/1 Completions means it ran correctly.

Now Postgres is setup and configured to work with Lenses.

Installing a Kafka Cluster - Optional

If you already have a Kafka cluster installed skip to the Installing HQ section.

The provided cluster install is for a simple single node open-source Kafka cluster with basic authentication and limited resources. Only suitable for testing or small development environments.

  1. Create the kafka-cluster-values.yaml file for installation. We are using "standard" storage class here. Depending on what K8s vendor you're using and where you are running it, your PCV setup will vary.

  1. Create a namespace for Kafka

  1. Install the Kafka cluster with the Bitnami Helm chart:

Give the Helm chart a few minutes to install then verify the installation:

Kafka cluster up and running.

Installing Lenses HQ

  1. Create lenses namespace

  1. Install Lenses HQ with its Helm chart using the following lensesHQ-values.yaml

Copy the above text to a file lenseshq-values.yaml and apply it with the following command:

You can verify that Lenses HQ is installed:

HQ Successfully Installed
  1. Accessing Lenses HQ:

In order to access Lenses HQ you will need to setup an ingress route using an ingress controller. There are so many different ways to do this depending on how and where you are running Kubernetes.

We have provided here an example ingress configuration using Nginx:

Installing Lenses Agent

  1. Once you have successfully logged on to Lenses HQ you can start to setup your agent. See Community Edition walk through for login details.

  2. Click on the Add New Environment button at the bottom of the main screen. Give your new environment a name (you can accept the other defaults for now) and click Create Environment.

  3. Be sure to save your Agent Key from the screen that follows.

Be sure to copy and save your Agent Key
  1. Now we can install the Lenses Agent using the agent_key. Here is the lenses-agent-values.yaml file:

  1. Copy the above config to a file named lenses-agent-values.yaml.

NOTE: you must replace value: "agent_key_Insert_Your_Agent_Key_Here" with your actual Agent Key you saved in a previous step.

Your lenses-agent-values.yaml should look like this:

Paste your actual agent key into the file.
  1. Use the Lenses Agent Helm chart to install the Lenses Agent

Give Kubernetes time to install the Lenses Agent, then go back to the Lenses HQ UI and view your Kafka cluster is connected. You can now uses Lenses on your own cluster! Congrats!!

Last updated

Was this helpful?