From f4fa863b880044b2d12fa84c05a8d72318c17cb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rcio=20Fernandes?= Date: Sun, 23 Aug 2026 03:28:12 +0000 Subject: [PATCH] modified: README.md --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 808a0bb..4105048 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ Kubernetes is an open‑source platform that automates the deployment, scaling, - [Create an pod](#create-an-pod) - [Get Pod](#get-pod) - [delete Pod](#delete-pod) + - [delete all pods with prefix](#delete-all-pods-with-prefix) - [OOMKilled](#oomkilled) - [Attach to an pod](#attach-to-an-pod) - [Run command on pod](#run-command-on-pod) @@ -247,6 +248,15 @@ echo $POD_NAME kubectl delete pod -n appNamespace -l app=myAppName ``` +### delete all pods with prefix + +``` bash +kubectl delete pod -n \ + $(kubectl get pods -n \ + -o jsonpath='{range .items[*]}{.metadata.name}{"\n"}{end}' \ + | grep '^PREFIX') +``` + ### OOMKilled **list all OOMKilled:**