Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ggerogery/80261b4117c6bc511d8828948b958136 to your computer and use it in GitHub Desktop.
Save ggerogery/80261b4117c6bc511d8828948b958136 to your computer and use it in GitHub Desktop.
delete-not-mounted.sh
#!/bin/bash
for d in $(ls /var/lib/kubelet/pods); do
mount | grep $d > /dev/null
if [ $? -ne 0 ]; then
#ls -lah /var/lib/kubelet/pods/$d/containers
echo $d
mv /var/lib/kubelet/pods/$d /tmp/
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment