Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Add k8s-forward
  • Loading branch information
jgmize committed Jan 6, 2020
1 parent 3747437 commit 7b92f4b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .bash_functions.d/k8s
Expand Up @@ -54,6 +54,10 @@ k8s-bash() {
k8s-exec $1 $2 bash
}

k8s-forward(){
kubectl port-forward $(k8s-pod $1) $2
}

k8s-r00t() {
# https://mobile.twitter.com/mauilion/status/1129468485480751104
kubectl run r00t --restart=Never -ti --rm --image lol --overrides '{"spec":{"hostPID": true, "containers":[{"name":"1","image":"alpine","command":["nsenter","--mount=/proc/1/ns/mnt","--","/bin/bash"],"stdin": true,"tty":true,"securityContext":{"privileged":true}}]}}'
Expand Down

0 comments on commit 7b92f4b

Please sign in to comment.