diff --git a/README.md b/README.md index 84518c4..65ce4b3 100644 --- a/README.md +++ b/README.md @@ -299,7 +299,7 @@ List all. kubectl get pods --all-namespaces --field-selector=status.phase=Failed --no-headers | wc -l ``` -Delete +**Delete all failed pods.** ``` bash count=0 @@ -321,10 +321,11 @@ done ### delete all pods with prefix ``` bash -kubectl delete pod -n \ - $(kubectl get pods -n \ +NAMESPACE=monitoring +kubectl delete pod -n ${NAMESPACE} \ + $(kubectl get pods -n ${NAMESPACE} \ -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}' \ - | grep '^PREFIX') + | grep '^alloy') ``` ### OOMKilled