From f9f8a45a06926eae75ada8c582be71d4a8107cef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A1rcio=20Fernandes?= Date: Mon, 28 Sep 2026 22:58:14 +0000 Subject: [PATCH] modified: README.md --- README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/README.md b/README.md index 28d674d..6824066 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Kubernetes is an open‑source platform that automates the deployment, scaling, - [delete Pod](#delete-pod) - [Failed pods](#failed-pods) - [delete all pods with prefix](#delete-all-pods-with-prefix) + - [get not ready pods](#get-not-ready-pods) - [OOMKilled](#oomkilled) - [network testing](#network-testing) - [Attach to an pod](#attach-to-an-pod) @@ -332,6 +333,25 @@ kubectl delete pod -n ${NAMESPACE} \ | grep '^alloy') ``` +### get not ready pods + +``` bash +kubectl get pods -A -o json \ +| jq -r ' + .items[] + | select(.status.containerStatuses != null) + | . as $pod + | $pod.status.containerStatuses[] + | select(.ready == false) + | [ + $pod.metadata.namespace, + $pod.metadata.name, + (.state.waiting.reason // .state.terminated.reason // "-") + ] + | @tsv +' +``` + ### OOMKilled **list all OOMKilled:**