Delete all non-running PODs
kubectl get pod --all-namespaces | \
awk '{if ($4 != "Running") \
system ("kubectl -n " $1 " delete pods " $2 " --grace-period=0 " " --force ")}'
References
- How To Install Kubernetes On Ubuntu 18.04
- How to Install and Configure Kubernetes (k8s) on Ubuntu 18.04 LTS
- 在 Kubernetes 上安装 Gitlab CI Runner
- How To Monitor Kubernetes With Prometheus
- kubernetes101-introduction-tutorial
- Kubernetes 基礎教學(一)原理介紹
- kubectl Cheat Sheet
- How To Access Kubernetes Dashboard Externally
- Kubernetes 基礎教學(一)原理介紹
- Kubernetes 基礎教學(二)實作範例:Pod、Service、Deployment、Ingress
- Kubernetes 基礎教學(三)Helm 介紹與建立 Chart
- My Favorite CLI Tools