Onboarding a K8s Cluster
Onboarding your Kubernetes (EKS/AKS) cluster to OneLens is quick and easy. By following the steps below, you will integrate your kubernetes cluster with OneLens.
RBAC Permission Required
To set up the OneLens K8 Agent, user who will be executing the Helm charts needs to have the following RBAC permissions. This is a one-time requirement.
rules:
- apiGroups: ["*"]
resources: ["*"]
verbs: ["*"]
Onboarding Checklist
Before you onboard your cluster, you need to verify that all the necessary prerequisites are in place.
Use the below command to quickly verify the prerequisites:
curl -sSL https://raw.githubusercontent.com/astuto-ai/onelens-installation-scripts/release/v1.3.0-prereq-check/scripts/prereq-check/onelens-prereq-check.sh | bash
This script will automatically check your cluster's configuration and let you know if anything needs to be adjusted.
Onboarding Process: Video Guide
Here is the detailed video showcasing how you can setup the OneLens Agent in your kubernetes cluster.
Step-by-Step Guide
Follow these steps to onboard your Kubernetes cluster. You can execute them locally or from a bastion server that has access to your clusters.
1. Verify Prerequisites
Ensure you meet all the prerequisites outlined above before proceeding.
2. Select the EKS/AKS Cluster
Use kubectl
to set the context to the cluster you want to onboard:
kubectl config use-context <cluster-name>
This command targets the correct cluster for the OneLens Agent deployment.
Precaution
Make sure you are running the onboarding script on the correct cluster. Copying and pasting a script generated for one cluster into a different cluster's context can cause errors or misconfiguration.
3. Run the Onboarding Script
Log into the OneLens UI and select the cluster you want to onboard.
Click on the plus icon.

The UI will automatically generate a deployment command for the selected cluster.
Copy the onboarding script.
Here’s the format of setup command that you’ll will get:
helm upgrade --install onelensdeployer onelens/onelensdeployer \
--set job.env.CLUSTER_NAME="<cluster_name>" \
--set job.env.REGION="<region>" \
--set-string job.env.ACCOUNT="<account_id>" \
--set job.env.REGISTRATION_TOKEN="<registration_token>"

Run it in your terminal.
4. Verification
It will take around 2-3 minutes for the deployment of the agent in your cluster.
After the agent deployment, the status in the OneLens UI will show as Connecting
.

The status will update to Connected
within 1–2 hours, once data is received on our end.

Finally, simply click on the cluster name to view detailed insights and analysis.
Upgrade the OneLens Agent
You can initiate OneLens agent upgrades directly from your OneLens account. The console displays the available patch version along with detailed release notes. You can select the clusters to patch, and the request will be routed to the authorized owner in your organization for approval.
How Patching is executed in you Cluster
OneLens Updater is responsible for the patch process.
It runs daily at 2:00 AM UTC and checks via OneLens APIs whether the current cluster is approved for patching.
If a request is found, it applies the patch without manual intervention.
Patch Command
Following patch command will be executed by OneLens Updater, ensuring the existing configurations are used:
helm upgrade onelens-agent onelens/onelens-agent --version=<latest-release> -n onelens-agent
Last updated