How to connect cloud environments#
Add your Kubernetes cloud environments to Lens Desktop so that clusters are automatically discovered and kept in sync. You can also manage local kubeconfig files from the same page.
Prerequisites#
- Lens Desktop installed and signed in with a Lens ID
- A Plus, Pro, or Enterprise subscription plan. For details, see Lens Pricing
- For AWS EKS: an AWS account with permissions to list and describe EKS clusters (e.g.,
eks:ListClusters,eks:DescribeCluster) - For Azure AKS: an Azure account with Reader access to the subscriptions containing your AKS clusters
Navigate to Preferences > Integrations > Kubernetes Environments.
Connect an AWS EKS account#
Lens discovers all EKS clusters in the AWS account you connect and keeps the list in sync automatically.
- Open Preferences > Integrations.
- In the AWS EKS section, click Add AWS Account.
- Select a sign-in method:
Use this method if your organization uses IAM Identity Center (formerly AWS SSO). This is the recommended approach for most users.
- Click Sign in with AWS SSO.
- Sign in with your company login (IAM Identity Center) in the browser window that opens.
- Authorize access when prompted.
- Wait for the browser to redirect you back to Lens Desktop.
Use this method if you have IAM user credentials. This option is listed under Advanced Options in the sign-in dialog.
- Click Access Key Sign-in (IAM User).
- Enter your AWS Access Key ID.
- Enter your AWS Secret Access Key.
- (Optional) Enter your AWS Session Token if you are using temporary credentials.
- Click Connect.
Use this method to assume a role using existing credentials from an AWS profile. This option is listed under Advanced Options in the sign-in dialog.
- Click Connect via IAM Role.
- Select an existing AWS profile from the dropdown.
- Enter the Role ARN you want to assume.
- (Optional) Enter a Session Name to identify the assumed-role session.
- Click Connect.
Verify that the status changes to Connected and shows the number of discovered profiles. Click the status indicator to expand the table and see all connected AWS profiles with their cluster counts.
Tip
Connect multiple AWS accounts to manage clusters across different regions and accounts from a single view. AWS EKS integration requires internet access and is not available in airgapped environments.
Connect an Azure AKS account#
Lens discovers AKS clusters across your Azure subscriptions.
- Open Preferences > Integrations.
- In the Azure AKS section, click Add Azure Account.
- Select a sign-in method:
Use this method if your organization does not require a specific Azure cloud or tenant. Lens automatically detects the correct cloud instance and tenant.
- Click Sign in with recommended settings.
- Sign in with your Azure credentials in the browser window that opens.
- Authorize access when prompted.
- Wait for the browser to redirect you back to Lens Desktop.
Use this method when your organization requires a specific Azure cloud instance or tenant.
- Click Advanced sign-in configuration.
- Select the target Cloud instance from the dropdown.
- Enter your Organization or Tenant identifier.
- Click Sign in.
- Sign in with your Azure credentials in the browser window that opens and authorize access.
- Wait for the browser to redirect you back to Lens Desktop.
Verify that the status changes to Connected and shows the number of connected accounts. The expanded table shows your organization name, subscription count, and a row menu for each account.
Manage local kubeconfigs#
Watch kubeconfig files and folders on your filesystem. Lens automatically detects changes and updates your cluster list.
- Open Preferences > Integrations.
- In the Local Kubeconfigs section, choose an option:
- Click Watch files & folders to select kubeconfig files or directories to monitor.
- Click Manually add kubeconfig to paste kubeconfig content directly.
- Click Watch files to select individual kubeconfig files.
- Click Watch folders to select directories containing kubeconfig files.
- Click Manually add kubeconfig to paste kubeconfig content directly.
Note
On Windows, files and folders must be added separately because the file picker cannot select both at the same time.
Lens watches selected paths for changes. When you add, remove, or modify a kubeconfig file in a watched folder, Lens updates the cluster list automatically.
Manage connections#
Each connector table includes a row menu (three-dot icon) for managing individual connections:
- Disconnect: Removes a cloud account or stops watching a kubeconfig path.
- Refresh: Re-syncs cluster discovery for a cloud account.
Warning
Disconnecting a cloud account removes all clusters discovered through that account from Lens Desktop. Clusters from other sources are not affected.
Connection status reference#
| Status | Meaning |
|---|---|
| Connected (link icon + count) | Active connection with discovered clusters |
| Not Connected (unlink icon) | No connections configured for this connector |
Verify your connections#
After connecting a cloud account or adding kubeconfig paths:
- Check that the connector status shows Connected with a cluster count.
- Open the Lens catalog sidebar and verify that your discovered clusters appear in the cluster list.
If clusters do not appear, verify that your cloud account credentials have the required permissions and that the clusters are running.