1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

erge branch 'extensions-docs' into pw-clusters-content

This commit is contained in:
Paul Williams 2020-11-03 13:04:47 -08:00
commit b5e4d5828a
5 changed files with 62 additions and 16 deletions

View File

@ -8,7 +8,9 @@ Lens is the most powerful Kubernetes IDE on the market. It is a standalone appli
Watch this introductory video to see Lens in action: Watch this introductory video to see Lens in action:
<iframe width="560" height="315" src="https://www.youtube.com/embed/04v2ODsmtIs" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe> [![Screenshot](img/lens-intro-video-screenshot.png)](https://youtu.be/04v2ODsmtIs)
**Note:** Use CTRL+click (on Windows and Linux) or CMD+click (on MacOS) to open the above in a new tab
## Downloading Lens ## Downloading Lens

View File

@ -1,35 +1,63 @@
# Cluster Settings # Cluster Settings
It is easy to configure Lens Clusters to your liking through its various settings. By right-clicking the cluster of choice you can open the `Settings`. It is easy to configure Lens Clusters to your liking through its various settings. By right-clicking the cluster of choice you can open `Settings`.
![Cluster Settings](images/cluster-settings.png) ## Status
## Cluster Status An overview of the cluster status.
This section in the cluster settings provides details including the detected distribution, kernel version, API endpoint and online status. ### Cluster Status
This section provides cluster details including the detected distribution, kernel version, API endpoint and online status.
## General ## General
General information for the cluster with some settings that can be customized.
### Cluster Name ### Cluster Name
The cluster name is inheritated from the kubeconfig by default. You can change the cluster name to another value by updating here. Note this does not update your kubeconfig file.
### Workspace ### Workspace
This is the Lens Workspace that the cluster is associated with. You can change to another workspace or create a new workspace - this option will take you the Workspaces editor where you can create a new workspace and then
navigate back to the cluster settings.
### Cluster Icon ### Cluster Icon
A random cluster icon is associated with your cluster when it is first created. You can define your own cluster icon here.
### HTTP Proxy ### HTTP Proxy
If you need to use a HTTP proxy to communicate with the Kubernetes API you can define it here.
### Prometheus ### Prometheus
Lens can be configured to query a Prometheus server that is installed in the cluster. The query format used can be configured here to either auto-detect or a pre-configured query format. The available formats are:
* Lens
* Helm Operator
* Prometheus Operator
* Stacklight
For more details of custom Prometheus configurations refer to this [guide](https://github.com/lensapp/lens/blob/master/troubleshooting/custom-prometheus.md).
### Working Directory ### Working Directory
The terminat working directory can be configured here - by default it is set to `$HOME`.
## Features ## Features
Additional Lens features that can be installed by the user.
### Metrics ### Metrics
Enable timeseries data visualization (Prometheus stack) for your cluster. Install this only if you don't have existing Prometheus stack installed.
### User Mode ### User Mode
User Mode feature enables non-admin users to see namespaces they have access to. This is achieved by configuring RBAC rules so that every authenticated user is granted to list namespaces.
## Removal
Remove the current cluster.

View File

@ -4,40 +4,56 @@ In this topic, we'll teach you the fundamental concepts for building extensions.
## Installing and Building the extension ## Installing and Building the extension
Simple Lens extension that adds "hello-world" page to a cluster menu. Simple Lens extension that adds "Hello World" page to a cluster menu.
### Linux ### Linux
First you will need to clone the [Lens Extension samples](https://github.com/lensapp/lens-extension-samples) repository to your local machine:
```sh
git clone https://github.com/lensapp/lens-extension-samples.git
```
Next you need to create a symlink from the directory that Lens will monitor for user installed extensions to the sample extension, in this case **helloworld-sample**:
```sh ```sh
mkdir -p ~/.k8slens/extensions mkdir -p ~/.k8slens/extensions
git clone https://github.com/lensapp/lens-extension-samples.git cd ~/.k8slens/extensions
cp -pr lens-extension-samples/helloworld-sample ~/.k8slens/extensions ln -s <lens-extension-samples directory>/helloworld-sample helloworld-sample
``` ```
To build the extension you can use `make` or run the `npm` commands manually: To build the extension you can use `make` or run the `npm` commands manually:
```sh ```sh
cd ~/.k8slens/extensions/helloworld-sample cd <lens-extension-samples directory>/helloworld-sample
make build make build
``` ```
OR OR
```sh ```sh
cd ~/.k8slens/extensions/helloworld-sample cd <lens-extension-samples directory>/helloworld-sample
npm install npm install
npm run build npm run build
``` ```
Open Lens application and navigate to a cluster. You should see "Hello World" in the Lens sidebar menu. If you want to watch for any source code changes and automatically rebuild the extension you can use:
```sh
cd <lens-extension-samples directory>/helloworld-sample
npm run dev
```
Finally, if you already have Lens open you will need to quit and restart Lens for the extension to be loaded. After this initial restart you can reload Lens and it will pick up any new builds of the extension. Within Lens connect to an existing cluster or [create a new one](../../clusters/adding-clusters.md). You should see then see the "Hello World" page in the Lens sidebar cluster menu.
## Developing the extension ## Developing the extension
Let's make a change to the message: Let's make a change to the message that our helloworld-sample extension displays:
* Change the message from Hello World from HelloWorld! to **Hello Lens Extensions** in `page.tsx` * Navigate to `<lens-extension-samples directory>/helloworld-sample`.
* Rebuild the extension * Change the message from HelloWorld! to **Hello Lens Extensions** in `page.tsx`.
* Reload the Lens window * Rebuild the extension or, if you used `npm run dev`, the extension should automatically rebuild.
* Reload the Lens window and click on the Hello World page.
* You should see the updated message showing up. * You should see the updated message showing up.
## Next steps ## Next steps

Binary file not shown.

After

Width:  |  Height:  |  Size: 754 KiB

View File

@ -8,7 +8,7 @@ repo_url: https://github.com/lensapp/lens
copyright: Copyright &copy; 2020 <a href="https://mirantis.com/">Mirantis Inc.</a> - All rights reserved. copyright: Copyright &copy; 2020 <a href="https://mirantis.com/">Mirantis Inc.</a> - All rights reserved.
edit_uri: "" edit_uri: ""
nav: nav:
- Overview: index.md - Overview: README.md
- Getting started: - Getting started:
- Downloading Lens: getting-started/downloading-lens.md - Downloading Lens: getting-started/downloading-lens.md
- Preferences: getting-started/preferences.md - Preferences: getting-started/preferences.md