From a9773142ad99ee9cf6866fc91b007bf1a3497162 Mon Sep 17 00:00:00 2001 From: roc Date: Mon, 4 Nov 2024 14:55:25 +0800 Subject: [PATCH] update at 2024-11-04 14:55:25 --- content/appendix/kubectl/pod.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/appendix/kubectl/pod.md b/content/appendix/kubectl/pod.md index 627ae33..a5ba962 100644 --- a/content/appendix/kubectl/pod.md +++ b/content/appendix/kubectl/pod.md @@ -6,7 +6,7 @@ ``` bash - kubectl get pod -o wide --all-namespaces | awk '{if($4=="Evicted"){cmd="kubectl -n "$1" delete pod "$2; system(cmd)}}' + kubectl get pod -o wide --all-namespaces --no-headers | awk '{if($4=="Evicted"){cmd="kubectl -n "$1" delete pod "$2; system(cmd)}}' ``` @@ -14,7 +14,7 @@ ``` bash - kubectl get pod -o wide --all-namespaces | awk '{if($4!="Running"){cmd="kubectl -n "$1" delete pod "$2; system(cmd)}}' + kubectl get pod -o wide --all-namespaces --no-headers | awk '{if($4!="Running"){cmd="kubectl -n "$1" delete pod "$2; system(cmd)}}' ```