Created
April 10, 2022 03:36
-
-
Save nhthai2005/877775b9e931784d8164faebad616390 to your computer and use it in GitHub Desktop.
Kubernetes completion script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kubectl Autocomplete | |
source <(kubectl completion bash) | |
alias k=kubectl | |
complete -F __start_kubectl k | |
alias kns='kubectl config set-context --current --namespace' | |
alias kurrent='kubectl config view --minify -o "jsonpath={..namespace}" | xargs -I %s echo "Current Namespace: %s"' | |
alias kcurrent=kurrent | |
alias nodetop='k get nodes | grep Ready | cut -d" " -f1 | xargs kubectl describe node | grep -E "Name: |cpu |memory "' | |
alias ktop=nodetop | |
export KUBECONFIG=$HOME/.kube/config | |
# Helm completion bash | |
source <(helm completion bash) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Kubernetes completion script | |
source <(kubectl completion zsh) | |
alias k=kubectl | |
complete -F __start_kubectl k | |
alias kns='kubectl config set-context --current --namespace' | |
alias kurrent='kubectl config view --minify -o "jsonpath={..namespace}" | xargs -I %s echo "Current Namespace: %s"' | |
alias kcurrent=kurrent | |
alias nodetop='k get nodes | grep Ready | cut -d" " -f1 | xargs kubectl describe node | grep -E "Name: |cpu |memory "' | |
alias ktop=nodetop | |
export KUBECONFIG=$HOME/.kube/config | |
# Helm completion zsh | |
source <(helm completion zsh) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment