mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
feat(kubectl): get and set current context namespace
Signed-off-by: Jans Rautenbach <git@moat.rauten.co.za>
This commit is contained in:
parent
3e7ef0182f
commit
1e511d8c5c
2 changed files with 6 additions and 2 deletions
|
|
@ -24,11 +24,13 @@ alias kaf='kubectl apply -f'
|
|||
# Drop into an interactive terminal on a container
|
||||
alias keti='kubectl exec -t -i'
|
||||
|
||||
# Manage configuration quickly to switch contexts between local, dev ad staging.
|
||||
# Manage configuration quickly to switch contexts between local, dev and staging.
|
||||
alias kcuc='kubectl config use-context'
|
||||
alias kcsc='kubectl config set-context'
|
||||
alias kcdc='kubectl config delete-context'
|
||||
alias kccc='kubectl config current-context'
|
||||
alias kcsetns="kcsc --current --namespace"
|
||||
alias kcgetns="k config view --minify -o 'jsonpath={.contexts[0].context.namespace}'"
|
||||
|
||||
# List all contexts
|
||||
alias kcgc='kubectl config get-contexts'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue