You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-4Lines changed: 50 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -726,7 +726,15 @@ views:
726
726
727
727
## Plugins
728
728
729
-
K9s allows you to extend your command line and tooling by defining your very own cluster commands via plugins. K9s will look at `$XDG_CONFIG_HOME/k9s/plugins.yaml` to locate all available plugins.
729
+
K9s allows you to extend your command line and tooling by defining your very own cluster commands via plugins.
730
+
Minimally we look at `$XDG_CONFIG_HOME/k9s/plugins.yaml` to locate all available plugins.
731
+
Additionally, K9s will scan the following directories for additional plugins:
732
+
733
+
*`$XDG_CONFIG_HOME/k9s/plugins`
734
+
*`$XDG_DATA_HOME/k9s/plugins`
735
+
*`$XDG_DATA_DIRS/k9s/plugins`
736
+
737
+
The plugin file content can be either a single plugin snippet, a collections of snippets or a complete plugins definition (see examples below...).
730
738
731
739
A plugin is defined as follows:
732
740
@@ -760,12 +768,15 @@ K9s does provide additional environment variables for you to customize your plug
760
768
761
769
Curly braces can be used to embed an environment variable inside another string, or if the column name contains special characters. (e.g. `${NAME}-example` or `${COL-%CPU/L}`)
762
770
763
-
### Plugin Example
771
+
### Plugin Examples
772
+
773
+
Define several plugins and host them in a single file. These can leave in the K9s root config so that they are available on any clusters. Additionally, you can define cluster/context specific plugins for your clusters of choice by adding clusterA/contextB/plugins.yaml file.
764
774
765
-
This defines a plugin for viewing logs on a selected pod using `ctrl-l` as shortcut.
775
+
The following defines a plugin for viewing logs on a selected pod using `ctrl-l` as shortcut.
766
776
767
777
```yaml
768
-
# $XDG_DATA_HOME/k9s/plugins.yaml
778
+
# Define several plugins in a single file in the K9s root configuration
779
+
# $XDG_DATA_HOME/k9s/plugins.yaml
769
780
plugins:
770
781
# Defines a plugin to provide a `ctrl-l` shortcut to tail the logs while in pod view.
771
782
fred:
@@ -789,6 +800,41 @@ plugins:
789
800
- $CONTEXT
790
801
```
791
802
803
+
Similarly you can define the plugin above in a directory using either a file per plugin or several plugins per files as follow...
804
+
805
+
The following defines two plugins namely fred and zorg.
806
+
807
+
```yaml
808
+
# Multiple plugins in a single file...
809
+
# Note: as of v0.40.9 you can have ad-hoc plugin dirs
Lastly you can define plugin snippets in their own file. The snippet will be named from the file name. In this case, we define a `bozo` plugin using a plugin snippet.
828
+
829
+
```yaml
830
+
# $XDG_DATA_HOME/k9s/plugins/schtuff/bozo.yaml
831
+
shortCut: Shift-B
832
+
description: Bozo
833
+
scopes:
834
+
- deploy
835
+
command: bozo
836
+
```
837
+
792
838
> NOTE: This is an experimental feature! Options and layout may change in future K9s releases as this feature solidifies.
Thank you to all that contributed with flushing out issues and enhancements for K9s!
8
+
I'll try to mark some of these issues as fixed. But if you don't mind grab the latest rev
9
+
and see if we're happier with some of the fixes!
10
+
If you've filed an issue please help me verify and close.
11
+
12
+
Your support, kindness and awesome suggestions to make K9s better are, as ever, very much noted and appreciated!
13
+
Also big thanks to all that have allocated their own time to help others on both slack and on this repo!!
14
+
15
+
As you may know, K9s is not pimped out by corps with deep pockets, thus if you feel K9s is helping your Kubernetes journey,
16
+
please consider joining our [sponsorship program](https://github.com/sponsors/derailed) and/or make some noise on social! [@kitesurfer](https://twitter.com/kitesurfer)
17
+
18
+
On Slack? Please join us [K9slackers](https://join.slack.com/t/k9sers/shared_invite/enQtOTA5MDEyNzI5MTU0LWQ1ZGI3MzliYzZhZWEyNzYxYzA3NjE0YTk1YmFmNzViZjIyNzhkZGI0MmJjYzhlNjdlMGJhYzE2ZGU1NjkyNTM)
19
+
20
+
## Maintenance Release!
21
+
22
+
* Refactored plugins implementation, hopefully we didn't hose them 😳
23
+
* Updated plugins docs
24
+
* Apparently when it comes to icons, I've chosen... poorly 🙀
25
+
Updated `write` icon 🔓->✍️, hopefully for the better 👀??
26
+
27
+
## Videos Are In The Can!
28
+
29
+
Please dial [K9s Channel](https://www.youtube.com/channel/UC897uwPygni4QIjkPCpgjmw) for up coming content...
0 commit comments