added full logs viewing (#2002)

Changes to be committed:
	modified:   README.md
	new file:   log_full.yml

Co-authored-by: Ryne Yang <ryneyang@acuityads.com>
mine
linehrr 2023-03-16 16:08:30 -04:00 committed by GitHub
parent 19016abd9d
commit 8e5b5ceebd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 56 additions and 0 deletions

View File

@ -10,3 +10,4 @@ K9s plugins extend the tool to provide additional functionality via actions to f
| 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/) |
| log_full.yml | get full logs from pod/container | pods/containers | Ctrl-l | |

55
plugins/log_full.yml Normal file
View File

@ -0,0 +1,55 @@
plugin:
# See https://k9scli.io/topics/plugins/
raw-logs-follow:
shortCut: Ctrl-L
description: logs -f
scopes:
- po
command: kubectl
background: false
args:
- logs
- -f
- $NAME
- -n
- $NAMESPACE
- --context
- $CONTEXT
log-less:
shortCut: Shift-L
description: "logs|less"
scopes:
- po
command: bash
background: false
args:
- -c
- '"$@" | less'
- dummy-arg
- kubectl
- logs
- $NAME
- -n
- $NAMESPACE
- --context
- $CONTEXT
log-less-container:
shortCut: Shift-L
description: "logs|less"
scopes:
- containers
command: bash
background: false
args:
- -c
- '"$@" | less'
- dummy-arg
- kubectl
- logs
- -c
- $NAME
- $POD
- -n
- $NAMESPACE
- --context
- $CONTEXT