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 Lens website.

System requirements#

Before you proceed with Lens Desktop installation, verify that your system meets the system requirements.

Hardware requirements#

Minimum hardware requirements:

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

Platforms#

Lens has been tested on the following platforms:

  • macOS
  • Windows
  • Linux

Although Lens may still work on operating systems that are beyond their end of life support date we highly recommend staying on supported versions of the underlying operating system. Please see a list of supported OS versions here.

Install Lens Desktop on macOS#

  1. Select and download a suitable .dmg file with Lens Desktop from the Lens website.
  2. Double-click the .dmg file and drag Lens.app to the Applications folder, making it available in the macOS Launchpad.
  3. Add Lens to your Dock by right-clicking on the icon to bring up the context menu and choosing Options, Keep in Dock.

Install Lens Desktop on Windows#

  1. Download the Lens Desktop installer for Windows.
  2. Install Lens Desktop by running the Lens-Setup-{version}.exe installer. By default, Lens Desktop installs under C:\users\{username}\AppData\Local\Programs\Lens.

Install Lens Desktop on Linux#

Attention

Installation of Lens Desktop on Linux is available only for machines with the amd64 (or for RPM, x86_64) architecture.

You have the following downloading options for Linux:

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

Note

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

Debian#

On Debian Linux, such as Ubuntu, you can install Lens Desktop from the Lens apt repo:

  1. Get the lens 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 repo to your /etc/apt/sources.list.d directory. For Ubuntu versions newer than 18.04 use 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
    

    On Ubuntu 18.04, instead 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
    

RPM#

For RPM-based distributions, install Lens Desktop from the Lens RPM repository:

CentOS/RHEL 8 or newer, or Fedora#

  1. Configure your system to use the Lens RPM repository:

    sudo dnf config-manager --add-repo https://downloads.k8slens.dev/rpm/lens.repo
    
    or if dnf is not available:
    sudo yum-config-manager --add-repo https://downloads.k8slens.dev/rpm/lens.repo
    

  2. Install or update Lens Desktop.

    sudo dnf install lens
    
    or if dnf is not available:
    sudo yum install lens
    

  3. Run Lens Desktop:

    lens-desktop
    

CentOS/RHEL 7#

  1. Configure your system to use the Lens 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
    

AppImage#

  1. Download the AppImage file here.
  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>
    

After installing Lens manually (not using a package manager file such as .deb or .rpm) the following will need to be done to allow protocol handling. This assumes 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 directions:

  2. ~/.local/share/applications/ to install for all users

  3. /usr/share/applications to install for your user

  4. That file should have the following contents, with <path/to/executable> being the absolute path to where you have installed the unpacked Lens executable:

    [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;
    

  5. Then run the following command:
    xdg-settings set default-url-scheme-handler lens lens.desktop
    
  6. If that succeeds (exits with code 0) then your Lens install should be set up to handle lens:// URIs.

Snap#

  1. Download and install snap
  2. Download by running the following:
sudo snap install kontena-lens --classic

Updates#

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

In-app auto-updates are only available for exe, dmg, and AppImage installations. Snapcraft provides an auto-update mechanic via its daemon. Update other distributions manually.

See Lens release notes to find information about features, maintenance and so on.

Backup and restore data#

When updating to a major Lens Desktop version, user data such as clusters, preferences, and so on, migrates to new data structures. However, we recommend you to back up user data which is by default stored in the following directories:

  • MacOS

    ~/Library/Application Support/Lens/

  • Windows

    %APPDATA%\Lens\

  • Linux

    ~/.config/Lens/ or $XDG_CONFIG_HOME/Lens


Launch Lens Desktop