Updated Extensions docs

This commit is contained in:
Steve Richards committed 2020-10-28 15:29:05 +00:00
1 parent 4069e69e45
commit 008b3bfea7
2 files changed
+66 -22

No files matched your search

@@ -2,20 +2,45 @@
In this topic, we'll teach you the fundamental concepts for building extensions. Make sure you have [Node.js](https://nodejs.org/en/) and [Git](https://git-scm.com/) installed....
## Installing and Building the extension
Simple Lens extension that adds "hello-world" page to a cluster menu.
### Linux
```sh
mkdir -p ~/.k8slens/extensions
git clone https://github.com/lensapp/lens-extension-samples.git ~/.k8slens/extensions
```
To build the extension you can use `make` or run the `npm` commands manually:
```sh
cd ~/.k8slens/extensions/helloworld-sample
make build
```
OR
```sh
cd ~/.k8slens/extensions/helloworld-sample
npm install
npm run build
```
Open Lens application and navigate to a cluster. You should see "Hello World" in the Lens sidebar menu.
## Developing the extension
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam non ligula id tellus vehicula vestibulum sed quis neque. Pellentesque sed mollis augue, sit amet condimentum enim. Morbi commodo risus gravida dui gravida, ac vulputate erat consectetur. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Morbi dapibus molestie augue.
## Debugging the extension
And now this:
- One
- Two
- Three
Let's make a change to the message:
* Change the message from Hello World from HelloWorld! to **Hello Lens Extensions** in `page.tsx`
* Rebuild the extension
* Reload the Lens window
* You should see the updated message showing up.
## Next steps
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam non ligula id tellus vehicula vestibulum sed quis neque. Pellentesque sed mollis augue, sit amet condimentum enim. Morbi commodo risus gravida dui gravida, ac vulputate erat consectetur. Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. Morbi dapibus molestie augue.
In the next topic, [Extension Anatomy](anatomy.md), we'll take a closer look at the source code of the Hello World sample and explain key concepts.
You can find the source code of this tutorial at: [lensapp/lens-extension-samples](https://github.com/lensapp/lens-extension-samples/tree/master/helloworld-sample). The [Extension Guides](../guides/overview.md) topic contains other samples, each illustrating a different Lens Extension API.