Lens Desktop Installation Guide: macOS, Windows, Linux

7月30日 Published inDeveloper Tools

Lens is a dedicated Kubernetes IDE designed for developers and DevOps engineers. It is currently the most widely adopted integrated development environment for Kubernetes management.

By using Lens, you can accelerate your Kubernetes learning curve, improve team productivity, and consolidate your cloud-native development toolset.

Lens Desktop Installation Guide

System Requirements

Minimum hardware requirements: 2 GHz or faster processor, 1 GB RAM, 1 GB available disk space.

Supported operating systems:

OS Version Release
CentOS Stream CentOS Stream 9 -
Fedora Linux Fedora Linux 41 -
macOS macOS 13 (Ventura) macOS Ventura 13.7.6
RHEL RHEL 9 RHEL 9.5
Ubuntu Ubuntu 22.04 LTS (Jammy Jellyfish) Ubuntu 22.04.5 LTS
Windows 10 22H2 10.0.19045
Windows Server Windows Server 2022 (LTSC) 10.0.20348

Allowlist

Certain features, such as the built-in Lens Desktop Kubernetes cluster, require a stable network connection. If your network restricts outbound traffic, add the following URLs to your allowlist:

https://api.k8slens.dev/*

https://downloads.k8slens.dev/*

To allow specific IP addresses, please consult the related IP address list.

Integrity Check

You may encounter a checksum validation error during the initial launch. To prevent this issue, ensure you are installing the latest stable version of Lens Desktop.

Installation Steps by Platform

macOS

  1. Visit k8slens.dev/download. Select and download the appropriate .dmg file for your architecture (Intel or Apple Silicon).
  2. Double-click the .dmg file and drag the Lens application into the Applications folder. This ensures the app is accessible via Launchpad.
  3. Control-click the Lens Desktop icon in the Applications folder, then select Options > Keep in Dock for quick access.

Note: Lens Desktop requires access to your macOS keychain to store user credentials securely. Please grant access when prompted by the system.

Windows

  1. Visit k8slens.dev/download and download the Windows installer.
  2. Run the Lens-Setup-<VERSION>.exe installer. The default installation path is: C:\users\<username>\AppData\Local\Programs\Lens

Silent Installation:

For unattended deployments, use the following command-line parameters.

Parameter Description
/S Required. Enables silent mode.
/allusers Installs the application for all users. Requires administrative privileges.
/currentuser Installs for the current user only. This is the default setting.
/D="path" Specifies a custom installation directory.

• Single-user installation (default):

Lens.Setup.<RELEASE-ID>.exe /S

or

Lens.Setup.<RELEASE-ID>.exe /S /currentuser

Installation path: C:\Users\<USER-NAME>\AppData\Local\Programs

• All-users installation:

Lens.Setup.<RELEASE-ID>.exe /S /allusers

Installation path: C:\Program Files\Lens

Linux

Lens Desktop for Linux supports the AMD64 (x86_64) architecture. You can choose from several installation methods.

APT Repository (Debian/Ubuntu)
  1. Fetch and add the GPG key:
curl -fsSL https://downloads.k8slens.dev/keys/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/lens-archive-keyring.gpg > /dev/null
  1. Add the repository to your sources list:
echo "deb [arch=amd64 signed-by=/usr/share/keyrings/lens-archive-keyring.gpg] https://downloads.k8slens.dev/apt/debian stable main" | sudo tee /etc/apt/sources.list.d/lens.list > /dev/null
  1. Update your package list and install:
sudo apt update && sudo apt install lens
  1. Launch the application: lens-desktop
RPM Repository (Fedora/RHEL/CentOS)

Fedora, CentOS Stream/RHEL 8 and newer:

  1. Configure the repository using your preferred package manager:
# DNF5
sudo dnf config-manager addrepo --from-repofile=https://downloads.k8slens.dev/rpm/lens.repo

# Older DNF
sudo dnf config-manager --add-repo https://downloads.k8slens.dev/rpm/lens.repo

# YUM
sudo yum-config-manager --add-repo https://downloads.k8slens.dev/rpm/lens.repo
  1. Install Lens:
sudo dnf install lens   # or sudo yum install lens if DNF is unavailable
  1. Launch the application: lens-desktop

CentOS Stream/RHEL 7:

  1. Configure the repository:
sudo yum-config-manager --add-repo https://downloads.k8slens.dev/rpm/lens.repo
  1. Install the specific package for EL7: sudo yum install lens-el7

  2. Launch the application: lens-desktop

Snap
  1. (Optional) If Snap is not installed on your system, follow the official Snap installation guide.
  2. Install Lens using the following command: sudo snap install kontena-lens --classic
AppImage
  1. Download the Lens AppImage file.
  2. Locate the file in your Downloads folder. Right-click the file, select Properties > Permissions, and check "Allow executing file as program." Alternatively, use the terminal:
chmod +x <FILE-NAME.AppImage>
./<FILE-NAME.AppImage>

Protocol Handling Configuration:

If you install Lens manually (such as via AppImage), you must configure protocol handling manually to ensure "Open in Lens" links work correctly. This guide assumes your system uses xdg-open.

  1. Create a lens.desktop file in ~/.local/share/applications/ (for the current user) or /usr/share/applications (for all users) with the following content:
[Desktop Entry]
Name=Lens
Exec=<path/to/executable> %U
Terminal=false
Type=Application
Icon=lens
StartupWMClass=Lens
Comment=Lens - The Kubernetes IDE
MimeType=x-scheme-handler/lens;
Categories=Network;
  1. Register Lens as the default handler for the lens:// scheme: xdg-settings set default-url-scheme-handler lens lens.desktop. A return value of 0 indicates success.

Updating Lens Desktop

By default, Lens Desktop manages updates automatically. You will receive a notification within the application whenever a new version is available.

• Auto-update is supported for .exe (Windows), .dmg (macOS), and AppImage (Linux). • Snap installations update automatically via the snapd daemon. • Other Linux distribution packages (APT/RPM) require manual updates through your package manager.

Backing Up and Restoring Data

When upgrading to a major version, your user data—including cluster configurations and preferences—is migrated to a new structure. However, it is highly recommended to perform a manual backup before performing significant updates. Default data locations are:

OS Path
macOS ~/Library/Application Support/Lens/
Windows %APPDATA%\Lens\
Linux ~/.config/Lens/ or $XDG_CONFIG_HOME/Lens