Lens - Kubernetes IDE

Lens Introduction

Using Helm Charts

Deploying applications to Kubernetes is seamless with Helm charts and Lens. In this guide, you’ll learn how to add Helm repositories, browse and install charts, customize values, inspect deployed resources, and connect to your application—all within Lens.

Prerequisites

Prerequisites

  • Lens installed and connected to your Kubernetes cluster
  • Helm CLI installed and configured
  • Access to the internet (for public Helm repositories)

1. Add Helm Repositories in Lens

  1. Open Lens and select Clusters → your-cluster.
  2. Go to Lens → Preferences → Kubernetes → Helm.
  3. Click Add to include community and custom repositories (e.g., Aerokube, Armory, Bitnami).

The image shows a software interface for managing Helm charts, with a dropdown menu listing various repositories and an option to add a custom Helm repository.


2. Browse and Search Charts

  1. Press Esc to close Preferences.
  2. Navigate to Apps → Charts in the sidebar.
  3. Filter by repository or search for cassandra.

The image shows a software interface listing various Helm charts, including their names, descriptions, versions, app versions, and repositories. The interface appears to be part of a Kubernetes management tool.

Click Details on the Cassandra chart to view installation steps and default values.


3. Install the Cassandra Chart

You can install directly in Lens or via the CLI:

# Add Bitnami repository (if not already added)
helm repo add bitnami https://charts.bitnami.com/bitnami

# Install Cassandra with default settings
helm install my-release bitnami/cassandra

# Install Cassandra with custom values
helm install my-release -f values.yaml bitnami/cassandra

Back in Lens, click Install, review the form, then click Install again. Lens will deploy the chart to your cluster.


4. Review and Customize Default Values

Before finalizing, Lens displays the values.yaml. Tweak global settings, storage, and more:

## Global Docker image parameters
global:
  imageRegistry: ""
  imagePullSecrets: []
  storageClass: ""

## Common parameters
nameOverride: ""
fullnameOverride: ""
commonLabels: {}
commonAnnotations: {}
clusterDomain: cluster.local
extraDeploy: []

## Diagnostic mode
diagnosticMode:
  enabled: false
  command:
    - sleep

Tip

Customize storageClass and imagePullSecrets to match your Kubernetes environment.


5. Inspect Deployed Resources

After installation, click View Helm Release in Lens to explore all resources:

Resource TypeDescription
ServiceAccountIdentity for Cassandra pods
SecretStores credentials (cassandra user)
ServiceExposes port 9042
StatefulSetManages Cassandra pods with storage
ConfigMapConfiguration for Cassandra

The image shows a Kubernetes dashboard in Minikube, displaying details of a Cassandra StatefulSet, including its status, labels, and resource usage.

Lens lets you edit metadata (labels, annotations) on the fly and view logs, metrics, and YAML definitions.


6. Connect to Cassandra

A. Using a Temporary Pod

kubectl run cassandra-client --rm -i --tty --restart=Never \
  --namespace default \
  --env CASSANDRA_PASSWORD=$CASSANDRA_PASSWORD \
  --image docker.io/bitnami/cassandra:4.0.0-debian-10-r3 -- bash

Inside the pod:

cqlsh -u cassandra -p $CASSANDRA_PASSWORD cassandra

B. Port-Forward from Local Host

kubectl port-forward --namespace default svc/my-release-cassandra 9042:9042 &
cqlsh -u cassandra -p $CASSANDRA_PASSWORD 127.0.0.1 9042

Watch Video

Watch video content

Previous
Adding and Removing Clusters