Skip to content

Instantly share code, notes, and snippets.

@XciD
Created March 23, 2020 10:51
Show Gist options
  • Save XciD/5eecba37d7025c5b267bd523514aa5f7 to your computer and use it in GitHub Desktop.
Save XciD/5eecba37d7025c5b267bd523514aa5f7 to your computer and use it in GitHub Desktop.
kube priviliged
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