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#
- Select and download a suitable
.dmg
file with Lens Desktop from the Lens website. - Double-click the
.dmg
file and dragLens.app
to the Applications folder, making it available in the macOS Launchpad. - 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#
- Download the Lens Desktop installer for Windows.
- Install Lens Desktop by running the
Lens-Setup-{version}.exe
installer. By default, Lens Desktop installs underC:\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:
-
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
-
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
-
Install or update Lens Desktop
sudo apt update sudo apt install lens
-
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#
-
Configure your system to use the Lens RPM repository:
or if dnf is not available:sudo dnf config-manager --add-repo https://downloads.k8slens.dev/rpm/lens.repo
sudo yum-config-manager --add-repo https://downloads.k8slens.dev/rpm/lens.repo
-
Install or update Lens Desktop.
or if dnf is not available:sudo dnf install lens
sudo yum install lens
-
Run Lens Desktop:
lens-desktop
CentOS/RHEL 7#
-
Configure your system to use the Lens RPM repository:
sudo yum-config-manager --add-repo https://downloads.k8slens.dev/rpm/lens.repo
-
Install or update Lens Desktop.
sudo yum install lens-el7
-
Run Lens Desktop:
lens-desktop
AppImage#
- Download the
AppImage
file here. - Navigate to the directory where you have the file downloaded and right-click the
AppImage
file and select Properties > Permissions. -
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.
-
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.
-
Create a file called
lens.desktop
in one of the following directions: -
~/.local/share/applications/
to install for all users -
/usr/share/applications
to install for your user -
That file should have the following contents, with
<path/to/executable>
being the absolute path to where you have installed the unpackedLens
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;
- Then run the following command:
xdg-settings set default-url-scheme-handler lens lens.desktop
- If that succeeds (exits with code
0
) then your Lens install should be set up to handlelens://
URIs.
Snap#
- Download and install snap
- 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