modified: README.md
This commit is contained in:
1 parent
14583355e4
commit
f9f8a45a06
1 file changed
+20
@@ -15,6 +15,7 @@ Kubernetes is an open‑source platform that automates the deployment, scaling,
|
|||||||
- [delete Pod](#delete-pod)
|
- [delete Pod](#delete-pod)
|
||||||
- [Failed pods](#failed-pods)
|
- [Failed pods](#failed-pods)
|
||||||
- [delete all pods with prefix](#delete-all-pods-with-prefix)
|
- [delete all pods with prefix](#delete-all-pods-with-prefix)
|
||||||
|
- [get not ready pods](#get-not-ready-pods)
|
||||||
- [OOMKilled](#oomkilled)
|
- [OOMKilled](#oomkilled)
|
||||||
- [network testing](#network-testing)
|
- [network testing](#network-testing)
|
||||||
- [Attach to an pod](#attach-to-an-pod)
|
- [Attach to an pod](#attach-to-an-pod)
|
||||||
@@ -332,6 +333,25 @@ kubectl delete pod -n ${NAMESPACE} \
|
|||||||
| grep '^alloy')
|
| 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
|
### OOMKilled
|
||||||
|
|
||||||
**list all OOMKilled:**
|
**list all OOMKilled:**
|
||||||
|
|||||||
Reference in new issue
Block a user