feat: plugin for adding an ephemeral debug container (#2147)
* docs: refactor plugins table * feat: plugin for adding an ephemeral debug container Uses https://github.com/nicolaka/netshoot containermine
parent
2d2746af3c
commit
c1e16e338a
|
|
@ -2,12 +2,18 @@
|
||||||
|
|
||||||
K9s plugins extend the tool to provide additional functionality via actions to further help you observe or administer your Kubernetes clusters.
|
K9s plugins extend the tool to provide additional functionality via actions to further help you observe or administer your Kubernetes clusters.
|
||||||
|
|
||||||
| Plugin-Name | Description | Available on Views | Shortcut | Kubectl plugin, external dependencies |
|
Following is an example of some of plugin files in this directory. Other files are not listed in this table.
|
||||||
|--------------------|----------------------------------|--------------------|----------|---------------------------------------------------------------------------------------|
|
|
||||||
| log_stern.yml | View resource logs using stern | pods | Ctrl-l | |
|
| Plugin-Name | Description | Available on Views | Shortcut | Kubectl plugin, external dependencies |
|
||||||
| log_jq.yml | View resource logs using jq | pods | Ctrl-j | kubectl-plugins/kubectl-jq |
|
|--------------------|------------------------------------------------------------------|--------------------|----------|---------------------------------------------------------------------------------------|
|
||||||
| job_suspend.yml | Suspends a running cronjob | cronjobs | Ctrl-s | |
|
| debug-container.yml| Add [ephemeral debug container][1]<br>([nicolaka/netshoot][2]) | containers | Shift-d | |
|
||||||
| dive.yml | Dive image layers | containers | d | [Dive](https://github.com/wagoodman/dive) |
|
| dive.yml | Dive image layers | containers | d | [Dive](https://github.com/wagoodman/dive) |
|
||||||
| k3d_root_shell.yml | Root shell to k3d container | containers | Shift-s | [jq](https://stedolan.github.io/jq/) |
|
| get-all.yml | get all resources in a namespace | all | g | [Krew](https://krew.sigs.k8s.io/), [ketall](https://github.com/corneliusweig/ketall/) |
|
||||||
| get-all.yml | get all resources in a namespace | all | g | [Krew](https://krew.sigs.k8s.io/), [ketall](https://github.com/corneliusweig/ketall/) |
|
| job_suspend.yml | Suspends a running cronjob | cronjobs | Ctrl-s | |
|
||||||
| log_full.yml | get full logs from pod/container | pods/containers | Ctrl-l | |
|
| k3d_root_shell.yml | Root shell to k3d container | containers | Shift-s | [jq](https://stedolan.github.io/jq/) |
|
||||||
|
| log_stern.yml | View resource logs using stern | pods | Ctrl-l | |
|
||||||
|
| log_jq.yml | View resource logs using jq | pods | Ctrl-j | kubectl-plugins/kubectl-jq |
|
||||||
|
| log_full.yml | get full logs from pod/container | pods/containers | Ctrl-l | |
|
||||||
|
|
||||||
|
[1]: https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/#ephemeral-container
|
||||||
|
[2]: https://github.dcom/nicolaka/netshoot
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
plugin:
|
||||||
|
#--- Create debug container for selected pod in current namespace
|
||||||
|
# See https://kubernetes.io/docs/tasks/debug/debug-application/debug-running-pod/#ephemeral-container
|
||||||
|
debug:
|
||||||
|
shortCut: Shift-D
|
||||||
|
description: Add debug container
|
||||||
|
scopes:
|
||||||
|
- containers
|
||||||
|
command: bash
|
||||||
|
background: false
|
||||||
|
confirm: true
|
||||||
|
args:
|
||||||
|
- -c
|
||||||
|
- "kubectl debug -it -n=$NAMESPACE $POD --target=$NAME --image=nicolaka/netshoot:v0.11 --share-processes -- bash"
|
||||||
Loading…
Reference in New Issue