Update content/en/docs/reference/kubectl/cheatsheet.md
Co-authored-by: Tim Bannister <tim@scalefactory.com>
This commit is contained in:
parent
1e85065aaa
commit
dc9f8bf21f
|
@ -74,7 +74,7 @@ kubectl config set-context gce --user=cluster-admin --namespace=foo \
|
||||||
|
|
||||||
kubectl config unset users.foo # delete user foo
|
kubectl config unset users.foo # delete user foo
|
||||||
|
|
||||||
# short alias to set/show context/namespace (useful for CKAD/CKA exams)
|
# short alias to set/show context/namespace
|
||||||
alias kn='f() { [ "$1" ] && kubectl config set-context --current --namespace $1 || kubectl config view --minify | grep namespace | cut -d" " -f6 ; } ; f'
|
alias kn='f() { [ "$1" ] && kubectl config set-context --current --namespace $1 || kubectl config view --minify | grep namespace | cut -d" " -f6 ; } ; f'
|
||||||
alias kx='f() { [ "$1" ] && kubectl config use-context $1 || kubectl config current-context ; } ; f'
|
alias kx='f() { [ "$1" ] && kubectl config use-context $1 || kubectl config current-context ; } ; f'
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in New Issue