Skip to content

Instantly share code, notes, and snippets.

@dex4er
Last active July 7, 2025 13:27
Show Gist options
  • Save dex4er/1df30186ff6ebdebf795a7821bf2720f to your computer and use it in GitHub Desktop.
Save dex4er/1df30186ff6ebdebf795a7821bf2720f to your computer and use it in GitHub Desktop.
kubectl-debug-filesystem.sh
ps -o pid,user,group|while read pid user group; do if [ $pid == 1 ]; then if [ $group -gt 0 ]; then addgroup -g $group debug; fi; if [ $user -gt 0 ]; then adduser -HD -u $user -G $group debug; fi fi; done
su debug
cd /proc/1/root
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment