Kubernetes Lens

Integrating Kubescape into Lens

Kubernetes Lens Extension

Kubernetes Lens is a common tool for managing and tracking your clusters in a comfort and organized way.
We provide a new way to integrate the power 💪 of Kubescape into Lens 👓 using the plugin system.

Prerequisites

Lens minimum 5.4.0 should first be installed on your workstation.

Setup

  1. Open Lens and navigate to the Extensions page (or press Command + Shift+E on macOS).

  2. Enter @kubescape/lens-extension into the Install Extension box

  3. Click on the Install button

InstallationInstallation

Getting Started

Kubescape extension for Lens will help you to easily scan and detect misconfigurations, software vulnerabilities, and RBAC (role-based-access-control) violations in your K8S cluster.

Cluster-level information

  • Navigate to Kubescape from the side menu.
  • A Kubescape scan runs automatically on your cluster for the first time. You can also run a scan on-demand by clicking the Scan button.
  • The table reflects a cluster-level summary of kubescape scan results.

scan-resultsscan-results

  • To find out more information on a specific Kubescape control and its failed resources, click on it to open the side bar for a detailed view:

cluster-level-infocluster-level-info

Object-level information

  • Kubescape information is also available at the object level. Click on the desired resource to open the details side bar and scroll down for Kubescape section:

This view shows only failed controls. If you don't see any that's a good thing :)

object-level-infoobject-level-info

Development mode

You must have a working Node.js environment.

  1. Clone the repository and then link to it:
git clone https://github.com/armosec/lens-kubescape.git 
mkdir -p ~/.k8slens/extensions
ln -s $(pwd)/lens-kubescape ~/.k8slens/extensions/kubescape
  1. Install dependencies and build the extension by running make or npm commands:
cd lens-kubescape
make build

OR

cd lens-kubescape
npm install
npm run build
  1. To put your development build into watch mode you can run:
npm start
  1. Open Lens and navigate to the Extensions page (or press Command + Shift+E on macOS).

  2. If everything is fine, you should see the @kubescape/lens-extension extension listed under Installed Extensions. Click Enable to enable it

To reflect your source code changes, reload the Lens window by pressing Command+R (macOS). Note: Any changes which affect Len's main thread will require a restart to the Lens application.

developmentdevelopment

Uninstall

  1. Remove the link:
rm ~/.k8slens/extensions/kubescape
  1. Restart Lens application.

Did this page help you?