From ccf3ee780a2925b672dca72011bffd5612b0412d Mon Sep 17 00:00:00 2001 From: hophacker Date: Mon, 7 Dec 2020 00:30:02 +0800 Subject: [PATCH] k_get_instance --- zsh/functions.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/zsh/functions.zsh b/zsh/functions.zsh index bef9450..9335576 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -470,3 +470,6 @@ function gcm { function k_delete_evicted { k delete pod `k get pods | grep Evicted | awk '{print $1}'` } +function k_get_instance { + k get deployment -o jsonpath="{.items[*].metadata.labels['app\.kubernetes\.io\/instance']}" | tr " " "\n" +}