Installing Community Edition Using Helm
Tool Requirements
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
Helm.
Text editor.
Kafka cluster and a Postgres database(we will provide setup instructions below for this if it's not already installed.)
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/bitnamiOnce you've added them, run the following command:
helm repo updateInstalling Postgres - if needed
If you already have Postgres installed skip to the next section: Configuring Postgres
Create a namespace for Postgres
Create a PVC claim for Postgres
Save the above to a file called postgres-pvc.yaml and then run the following command:
Install Postgres using the Bitnami Helm chart.
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.

Configuring Postgres
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

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.
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.
Create a namespace for Kafka
Install the Kafka cluster with the Bitnami Helm chart:
Give the Helm chart a few minutes to install then verify the installation:

Installing Lenses HQ
Create lenses namespace
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:

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
Once you have successfully logged on to Lenses HQ you can start to setup your agent. See Community Edition walk through for login details.
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.
Be sure to save your Agent Key from the screen that follows.

Now we can install the Lenses Agent using the agent_key. Here is the lenses-agent-values.yaml file:
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:

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?

