From 086eaabc2701b0a671fdcbadf0a7e0529d7bc32f Mon Sep 17 00:00:00 2001 From: hophacker Date: Mon, 30 Nov 2020 08:58:25 +0800 Subject: [PATCH] add functino k_delete_evicted --- zsh/aliases.zsh | 2 +- zsh/functions.zsh | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/zsh/aliases.zsh b/zsh/aliases.zsh index 3f4fdaa..e7559fb 100644 --- a/zsh/aliases.zsh +++ b/zsh/aliases.zsh @@ -217,6 +217,7 @@ alias brewu='brew update && brew upgrade && brew cleanup && brew doctor' alias emacs="env LC_CTYPE=zh_CN.UTF-8 emacs" # k8s +alias k="kubectl" alias kpg="kubectl get pods | grep" alias ksg="kubectl get service | grep" @@ -260,7 +261,6 @@ alias edit_alias="vim $yadr_zsh/aliases.zsh $yadr_zsh/functions.zsh -p" alias docker_purge='docker stop $(docker ps -qa);docker rm $(docker ps -qa)' alias yarn_sass="SASS_BINARY_SITE=https://npm.taobao.org/mirrors/node-sass/ yarn" alias vim="nvim" -alias k="kubectl" ## source files alias ss="source ~/.yadr/zsh/functions.zsh; source ~/.yadr/zsh/aliases.zsh" diff --git a/zsh/functions.zsh b/zsh/functions.zsh index d722ffd..bef9450 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -467,3 +467,6 @@ function gc { function gcm { (gc --message $*) || return } +function k_delete_evicted { + k delete pod `k get pods | grep Evicted | awk '{print $1}'` +}