Skip to content

Instantly share code, notes, and snippets.

@simonswine
Created May 29, 2018 16:23
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonswine/8c30a1fe557d732143ebbbed568e7fa9 to your computer and use it in GitHub Desktop.
Save simonswine/8c30a1fe557d732143ebbbed568e7fa9 to your computer and use it in GitHub Desktop.
nsenter into the host
kubectl run hack1 --restart=Never -t -i -n kube-system --image overridden --overrides '{"spec":{"hostPID": true, "containers":[{"name":"busybox","image":"alpine:3.7","command":["nsenter","--mount=/proc/1/ns/mnt","--","/bin/bash"],"stdin": true,"tty":true,"securityContext":{"privileged":true}}]}}' --rm --attach
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment