FreeLens
FreeLens is an open-source Kubernetes dashboard that provides a graphical interface for managing and monitoring Kubernetes clusters. When integrated with Teleport, FreeLens allows users to securely access and manage their Kubernetes clusters through a user-friendly web interface.
FreeLens is the Community-Maintained version if OpenLens. For more information, visit the FreeLens official Website.
Prerequisites
- Teleport Connect or
tshCLI tool installed. Refer to the Client Installation guide for installation instructions. - Kubectl installed on your machine. You can download it from the official Kubernetes documentation.
- FreeLens installed on your machine. You can download it from the FreeLens GitHub Releases page.
Configure FreeLens to use Teleport
Connect to your Teleport Cluster Connect to your Teleport cluster. Refer
to the Connect Client guide for instructions.
Copy Kubeconfig File Run the command below to copy the kubeconfig file
generated by Teleport. bash kubectl config view --flatten
Add Kubeconfig Cluster to Freelens
In Freelens, Select the Catalog tab on the left sidebar, then hover over the + button in the bottom right corner and click on the Add from Kubeconfig option.
Paste the kubeconfig content you copied earlier into the text area provided and click on the Add Cluster button.
Access your Kubernetes Cluster
Once the cluster is added, you can select it from the Catalog tab and start managing your Kubernetes resources through the FreeLens interface.
Limited Access to Kubernetes Namespaces
If your Teleport role restricts you to only access specific Kubernetes namespaces, it is best to specify the namespace you are able to access when adding the cluster in FreeLens. This ensures that FreeLens operates within the permissions granted by your Teleport role and does not try to access resources outside of your allowed namespaces.
Open Cluster Settings
After adding the cluster, click on the cluster name in the Catalog tab to open its details. Then, click on the Settings tab.
Specify Namespace
In the Settings tab, locate the Namespace field and enter the name of the namespaces you have access to. If you have access to multiple namespaces, you can specify them as a comma-separated list.
Metrics inside FreeLens
To view metrics inside OpenLens, you need to enable the Metrics option inside the FreeLens settings and set the Metrics Server URL to point to monitoring-system/prometheus-operated:9090.
Open FreeLens Settings
Click on the gear icon in the bottom left corner of the FreeLens application to open the settings.
Enable Metrics
In the settings menu, navigate to the Metrics section. Toggle the Enable Metrics option to On.
Set Metrics Server URL
In the Metrics Server URL field, enter the following URL:
monitoring-system/prometheus-operated:9090