Cleanup
How to Clean Up Zombie Processes
· ☕ 4 min read
1. What a Zombie Process Is How a process is created: The parent process calls fork() to create a child process The child process calls exec() to load a new program The child process finishes executing and calls exit() or returns The parent process calls wait() or waitpid() If the parent process never calls wait() or waitpid(), the child stays in the system after it finishes, becoming a zombie process.

Common Commands for Cleaning Up Kubernetes Cluster Resources
· ☕ 4 min read
Clusters that run for a long time often face various kinds of resource exhaustion. On top of that, when disk space runs low, Kubelet will proactively clean up images on its own, adding another source of uncertainty. This article provides some command snippets for cleanup work. 1. Cleaning Up Basic Kubernetes Objects Clean up Pods in Evicted state 1 sudo kubectl get pods --all-namespaces -o wide | grep Evicted | awk '{print $1,$2}' | sudo xargs -L1 kubectl delete pod -n Clean up Pods in Error state 1 sudo kubectl get pods --all-namespaces -o wide | grep Error | awk '{print $1,$2}' | sudo xargs -L1 kubectl delete pod -n Clean up Pods in Completed state 1 sudo kubectl get pods --all-namespaces -o wide | grep Completed | awk '{print $1,$2}' | sudo xargs -L1 kubectl delete pod -n Clean up unused PVs 1 sudo kubectl describe -A pvc | grep -E "^Name:.