2020-11-18 12:44:46 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
2023-04-03 10:38:42 +02:00
|
|
|
if (command -v kubectl &> /dev/null)
|
2020-11-18 12:44:46 +01:00
|
|
|
then
|
|
|
|
|
|
|
|
# create a quick alias
|
|
|
|
alias k=kubectl
|
2021-04-23 12:57:08 +02:00
|
|
|
alias ks="kubectl --namespace kube-system"
|
2020-11-18 12:44:46 +01:00
|
|
|
|
|
|
|
# add completion for the alias as well
|
|
|
|
complete -o default -F __start_kubectl k
|
2021-04-23 12:57:08 +02:00
|
|
|
complete -o default -F __start_kubectl ks
|
2020-11-18 12:44:46 +01:00
|
|
|
|
|
|
|
fi
|