Added kres & kconf
This commit is contained in:
parent
139cf98a2b
commit
6bd9a52adb
@ -38,3 +38,6 @@ alias ssh-add="ssh-add -t 43200"
|
|||||||
|
|
||||||
# Pretty print sqlite3
|
# Pretty print sqlite3
|
||||||
alias sqlite3="sqlite3 -header -column"
|
alias sqlite3="sqlite3 -header -column"
|
||||||
|
|
||||||
|
# Kubernetes
|
||||||
|
alias kconf='kubectl config'
|
||||||
|
@ -14,3 +14,14 @@ function git-config-as {
|
|||||||
echo "Configured as \"$NAME <$EMAIL>\""
|
echo "Configured as \"$NAME <$EMAIL>\""
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Kubernetes
|
||||||
|
function kres {
|
||||||
|
local _O _D
|
||||||
|
_O="-ocustom-columns=NAMESPACE:.metadata.namespace,NAME:.metadata.name"
|
||||||
|
_D="[0-9A-Za-z\-]"
|
||||||
|
if [ -z "$3" ]; then
|
||||||
|
kubectl get $1 -A $_O | grep "$2"
|
||||||
|
else
|
||||||
|
kubectl get $1 -A $_O | grep "$_D*$2$_D*\s\+$_D*$3$_D*"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user