Last active
December 19, 2024 16:44
-
-
Save schwabix/c69def14513a3bf5b7b1233ee3830e61 to your computer and use it in GitHub Desktop.
How to enter a Kubernetes pod as root
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # identify containername | |
| crictl -r unix:///run/containerd/containerd.sock ps | |
| # get full container id | |
| runc --root /run/containerd/runc/k8s.io/ list | grep xxxxxxx | |
| # enter container as root | |
| runc --root /run/containerd/runc/k8s.io/ exec -t -u 0 xxxxxxx sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment