config-bash/aliases.d/kubectl
2024-06-18 12:30:05 +00:00

17 lines
375 B
Bash

#!/bin/bash
if (command -v kubectl &>/dev/null); then
# create some usefull aliases
alias k="kubectl"
alias kg="kubectl get"
alias kd="kubectl describe"
alias ks="kubectl --namespace kube-system"
alias kga="kubectl get --all-namespaces"
# add completion for the alias as well
complete -o default -F __start_kubectl k
complete -o default -F __start_kubectl ks
fi