More clarification according to the discussion

This commit is contained in:
mtilson 2022-02-07 00:56:58 +03:00 committed by GitHub
parent dc9f8bf21f
commit 071d27ea12
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -74,9 +74,9 @@ kubectl config set-context gce --user=cluster-admin --namespace=foo \
kubectl config unset users.foo # delete user foo
# 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'
# short alias to set/show context/namespace (only works for bash and bash-compatible shells, current context to be set before using kn to set namespace)
alias kx='f() { [ "$1" ] && kubectl config use-context $1 || kubectl config current-context ; } ; f'
alias kn='f() { [ "$1" ] && kubectl config set-context --current --namespace $1 || kubectl config view --minify | grep namespace | cut -d" " -f6 ; } ; f'
```
## Kubectl apply