Skip to content

Commit

Permalink
Update the handy commands
Browse files Browse the repository at this point in the history
  • Loading branch information
ranjith-ka committed Jun 27, 2024
1 parent 001fcb7 commit 48f190a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,30 @@ _ssh() {
complete -F _ssh ssh
complete -F _ssh ssh-copy-id
#complete -F _ssh scp

#### Kubenetes Handy commands

function kube_desc_pod() {
if [ $# -eq 2 ]; then
kubectl describe po $1 -n $2
else
kubectl describe po $1
fi
}

function kdex-fn() {
if [ $# -eq 2 ]; then
kubectl exec -it $1 /bin/sh -n $2
else
kubectl exec -it $1 /bin/sh
fi
}

alias k='kubectl'
alias k_po_all='kubectl get po --all-namespaces'
alias k_po='kubectl get po'
alias kpo='kubectl get po'
alias k_svc_all='kubectl get svc --all-namespaces'
alias k_svc='kubectl get svc'
alias k_ds_po='kube_desc_pod'
alias k_login="kdex-fn"
Empty file added minikube/git/Readme.md
Empty file.

0 comments on commit 48f190a

Please sign in to comment.