Merge pull request #2166 from cornfeedhobo/rename-kubectl-alias-func

remove function wrapper around kubectl aliases
pull/2159/head
Noah Gorny 2022-12-04 00:39:49 +02:00 committed by GitHub
commit ec3c06fa33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 17 deletions

View File

@ -1,20 +1,16 @@
# shellcheck shell=bash # shellcheck shell=bash
about-alias 'kubectl aliases' about-alias 'kubectl aliases'
function _set_pkg_aliases() { if _command_exists kubectl; then
if _command_exists kubectl; then alias kc='kubectl'
alias kc='kubectl' alias kcgp='kubectl get pods'
alias kcgp='kubectl get pods' alias kcgd='kubectl get deployments'
alias kcgd='kubectl get deployments' alias kcgn='kubectl get nodes'
alias kcgn='kubectl get nodes' alias kcdp='kubectl describe pod'
alias kcdp='kubectl describe pod' alias kcdd='kubectl describe deployment'
alias kcdd='kubectl describe deployment' alias kcdn='kubectl describe node'
alias kcdn='kubectl describe node' alias kcgpan='kubectl get pods --all-namespaces'
alias kcgpan='kubectl get pods --all-namespaces' alias kcgdan='kubectl get deployments --all-namespaces'
alias kcgdan='kubectl get deployments --all-namespaces' # launches a disposable netshoot pod in the k8s cluster
# launches a disposable netshoot pod in the k8s cluster alias kcnetshoot='kubectl run netshoot-$(date +%s) --rm -i --tty --image nicolaka/netshoot -- /bin/bash'
alias kcnetshoot='kubectl run netshoot-$(date +%s) --rm -i --tty --image nicolaka/netshoot -- /bin/bash' fi
fi
}
_set_pkg_aliases