Skip to content

Install Lens Desktop#

Lens Desktop is lightweight and simple to install on all major platforms. You can find all installation options on the official Lens website.

System requirements#

Before installing Lens Desktop, verify that your computer meets the system requirements.

Minimum hardware requirements:

  • 2 GHz or faster processor
  • 1 GB of RAM
  • 1 GB of disk space

Supported operating systems:

  • macOS
  • Windows
  • Linux

Warning

Lens Desktop may work on operating systems that are beyond their end-of-life date. However, we recommend staying on supported versions of the operating system. See details about support lifecycles of various operating systems on endoflife.date .

Allowlists#

Some Lens Desktop features, such as Lens Desktop Kube, require stable internet connection. If your network configurations require specifying allowed URLs, add the following to your allow list:

  • https://api.k8slens.dev/*
  • https://downloads.k8slens.dev/*

If your network configurations require specifying allowed IP addresses, please refer to the list of required IP addresses.

Install Lens Desktop on macOS#

  1. On k8slens.dev/download , select and download a suitable .dmg file.
  2. Double-click the .dmg file and drag Lens.app to the Applications folder, making it available in Launchpad.
  3. Control-click the Lens Desktop icon and choose Options > Keep in Dock.

Info

Lens Desktop requires entry to Keychain Access to securely store the user credentials. Authorize Lens Desktop to store your credentials in Keychain Access.

Install Lens Desktop on Windows#

  1. On k8slens.dev/download , download the Lens Desktop installer for Windows.
  2. Install Lens Desktop by running the Lens-Setup-<VERSION>.exe installer. The default Lens Desktop installation path is C:\users\<username>\AppData\Local\Programs\Lens.

Silent installation#

Lens Desktop supports silent installation. The silent mode allows installing the application without user interaction through command-line parameters.

To complete silent installation, open the folder with the installer and run the Lens.Setup.<RELEASE-ID>.exe file using the following options:

Parameter Description
/S Required to specify. Specifies the silent mode.
/allusers Installs Lens Desktop for all users of the computer. Requires the Administrator user to perform the action.
/currentuser Installs Lens Desktop for the current user. This option is default, and you can skip specifying it.
/D="path" Specifies the installation directory.

To install Lens Desktop with the default parameters, run:

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

Lens.Setup.<RELEASE-ID>.exe /S /currentuser
The application can be found by the following path:
C:\Users\<USER-NAME>\AppData\Local\Programs

To install Lens Desktop for all users of the computer, run:

Lens.Setup.<RELEASE-ID>.exe /S /allusers
The application can be found by the following path:

C:\Program Files\Lens

Installation options on Linux#

Lens Desktop for Linux is available for the AMD64 (x86_64) architecture. You can choose from the following installation options:

  • Debian (APT) repository
  • RPM repository
  • AppImage file
  • .snap file

Info

For the Debian and RPM repository options the name of the installed Lens Desktop executable is now lens-desktop

Install Lens Desktop from the APT repository#

  1. Get the Lens Desktop public security key and add it to your keyring:

    curl -fsSL https://downloads.k8slens.dev/keys/gpg | gpg --dearmor | sudo tee /usr/share/keyrings/lens-archive-keyring.gpg > /dev/null
    
  2. Add the Lens Desktop repo to your /etc/apt/sources.list.d directory.

    Specify the stable channel:

    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
    

    Specify the bionic channel:

    echo "deb [arch=amd64 signed-by=/usr/share/keyrings/lens-archive-keyring.gpg] https://downloads.k8slens.dev/apt/debian bionic main" | sudo tee /etc/apt/sources.list.d/lens.list > /dev/null
    
  3. Install or update Lens Desktop:

    sudo apt update && sudo apt install lens
    
  4. Run Lens Desktop:

    lens-desktop
    

Install Lens Desktop from the RPM repository#

  1. Configure your system to use the Lens Desktop RPM repository with the DNF package manager:

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

    If DNF is not available, use the YUM package manager:

    sudo yum-config-manager --add-repo https://downloads.k8slens.dev/rpm/lens.repo
    
  2. Install or update Lens Desktop using DNF:

    sudo dnf install lens
    

    If DNF is not available, use the YUM package manager:

    sudo yum install lens
    
  3. Run Lens Desktop:

    lens-desktop
    
  1. Configure your system to use the Lens Desktop RPM repository:

    sudo yum-config-manager --add-repo https://downloads.k8slens.dev/rpm/lens.repo
    
  2. Install or update Lens Desktop.

    sudo yum install lens-el7
    
  3. Run Lens Desktop:

    lens-desktop
    

Install Lens Desktop with Snap#

  1. Optional. Download and install snap. Find Linux distributions that do not have pre-installed snap and installation instructions in Snap tutorials: Installing snapd .
  2. Install the Lens Desktop snap:

    sudo snap install kontena-lens --classic
    

Install Lens Desktop from the AppImage#

  1. Download the AppImage file.
  2. Navigate to the directory where you have the file downloaded and right-click the AppImage file and select Properties > Permissions.
  3. Select the Allow executing file as a program check box.

    Note

    Some file managers might offer to unselect the Is executable check box or other similar actions.

  4. In the Linux command line, navigate to the directory where you have the file downloaded and type the following commands:

    chmod +x <FILE-NAME.AppImage>
    ./<FILE-NAME.AppImage>
    

Configure protocol handling#

Protocol handling enables external programs to open Lens Desktop. For AppImage or other manually installed Lens Desktop instances, protocol handling must be enabled separately. Protocol handling is not required to run Lens Desktop but some Lens extensions may rely on it.

Note

It assumed that your Linux distribution uses xdg-open and the xdg-* suite of programs for determining which application can handle custom URIs.

  1. Create a file called lens.desktop in one of the following directories:

    ~/.local/share/applications/
    
    /usr/share/applications
    
  2. In lens.desktop, specify the absolute path to the unpacked Lens executable. Specify other parameters as follows:

    [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;
    
  3. Set the default handler:

    xdg-settings set default-url-scheme-handler lens lens.desktop
    

    If xdg-settings returns an exit code of 0, Lens Desktop is capable of handling lens:// URIs.

Updating Lens Desktop#

Lens Desktop supports auto-updating. When a new release is available, a notification appears in the application.

In-app auto-updates are available only for exe, dmg, and AppImage installations. The Snap instances are automatically updated through the snapd daemon. Update other Lens Desktop distributions manually.

See Lens Desktop release notes for more information about features, maintenance updates, and other updates.

Backup and restore data#

When updating to a major Lens Desktop version, user data such as clusters, preferences, and other configurations migrates to new data structures. However, we recommend you to back up user data. Find default user data locations below:

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

Launch Lens Desktop