From c9a845849e35a4eca176e05a8390a4b5905e1797 Mon Sep 17 00:00:00 2001 From: hophacker Date: Thu, 21 Mar 2019 08:44:53 +0800 Subject: [PATCH] add cmd kexec --- zsh/functions.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zsh/functions.zsh b/zsh/functions.zsh index 017ad26..fde4c39 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -153,3 +153,8 @@ function gitcopy() { function h() { helm $* --tls } +function kexec { + POD_NAME=`k get pods | grep wechat | awk '{print $1}'` + shift 1 + kubectl exec -it $POD_NAME $@ +}