1
css3 2021-07-22 12:13:37 +08:00 via iPhone
挺有意思,有空尝试一下
|
2
chendy 2021-07-22 12:30:53 +08:00
这个操作是什么时候用的呢,为啥不直接做个脚本或者 alias ?
|
3
wellsc 2021-07-22 12:31:29 +08:00 via iPhone
牛逼
|
4
huangmingyou OP @chendy 连续看多个 pod 的时候,简化操作步骤。方便在 vim 里面搜索 pod
|
5
etby 2021-07-22 13:49:31 +08:00
我选择 K9S
|
6
ck65 2021-07-22 13:53:05 +08:00
感谢分享,我继续使用 K9s
|
7
rainfd 2021-07-22 14:07:10 +08:00
K9s+1
|
8
kennylam777 2021-07-22 15:39:12 +08:00
k9s + 10086
|
9
li24361 2021-07-22 16:58:07 +08:00
感谢楼上几位,第一次知道 K9s
|
10
lululau 2021-07-22 17:03:10 +08:00
一个 k9s plugin,支持在一个新打开的 TMUX window / iTerm2 Tab 中打开日志,前提是容器内有 lnav
lnav: # Define a mnemonic to invoke the plugin shortCut: Shift-L # What will be shown on the K9s menu description: Lnav the latest log file in /data/logs/*/ # Collections of views that support this shortcut. (You can use `all`) scopes: - po # The command to run upon invocation. Can use Krew plugins here too! command: sh # Whether or not to run the command in background mode background: false # Defines the command arguments args: - -c - | if [ -n "${TMUX}" ]; then tmux new-window -n 'lnav ($NAME)' "kubectl exec $NAME -it -n $!NAMESPACE --context $CONTEXT -- /bin/bash -c \"/usr/bin/lnav /data/logs/*/\\\$(ls -t /data/logs/*/ | grep -P '\\d{4}-\\d{2}-\\d{2}.*\\.(log|gz)' | head -1)\"" else osascript -e ' tell app "iTerm2" tell current window create tab with default profile command "/usr/local/bin/kubectl exec $NAME -it -n $!NAMESPACE --context $CONTEXT -- /bin/bash -c '"'"'/usr/bin/lnav /data/logs/*/$(ls -t /data/logs/*/ | grep -P \"\\d{4}-\\d{2}-\\d{2}.*\\.(log|gz)\" | head -1)'"'"'" end end' fi |
11
Pythondr 2021-07-22 17:38:53 +08:00 1
lens 吧 https://k8slens.dev/
|
12
zzzmj 2021-07-22 18:44:59 +08:00
k9s+1,如果只是日志的话,可以用 stern.
|
13
Ansen 2021-07-22 20:48:45 +08:00
我选择用 lens
|
14
morty0 2021-07-22 22:40:11 +08:00
我选择 ELK
|