Last active
January 27, 2022 13:32
-
-
Save MaximShepelev/5e4efe2924263bf9a1a11f946f7e6567 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ----- kubectl ---------- | |
alias k='kubectl' | |
alias kdl='kubectl delete' | |
alias klg='kubectl logs' | |
alias klf='kubectl logs -f' | |
alias kaf='kubectl apply -f' | |
alias kdlf='kubectl delete -f' | |
# ----- kubectl get ---------- | |
alias kg='kubectl get' | |
alias kgp='kubectl get pods -o wide' | |
alias kgd='kubectl get deploy -o wide' | |
alias kgs='kubectl get svc -o wide' | |
alias kgn='kubectl get nodes -o wide' | |
# ----- kubectl describe ---------- | |
alias kd='kubectl describe' | |
alias kdp='kubectl describe pods' | |
alias kdd='kubectl describe deploy' | |
alias kds='kubectl describe svc' | |
alias kdn='kubectl describe nodes' | |
# ----- Kubectl config ------ | |
alias kc='kubectl config' | |
alias kcgc='kubectl config get-contexts' | |
alias kcuc='kubectl config use-context' | |
# alias kcdfns='kubectl config set-context --current --namespace=$1' | |
function kcdfns() { | |
kcgc | grep '\*' | |
kubectl config set-context --current --namespace=$1 | |
kcgc | grep '\*' | |
} | |
# wget https://raw.githubusercontent.com/jonmosco/kube-ps1/master/kube-ps1.sh -P ~/.local/ | |
activate-kube-prompt(){ | |
source ~/.local/kube-ps1.sh | |
PS1='[\u@\h \W $(kube_ps1)]\$ ' | |
} | |
deactivate-kube-prompt(){ | |
source ~/.bashrc | |
} | |
## Git aliases | |
alias gA='git add -A' | |
alias ga='git add .' | |
alias gcm='git commit -m' | |
alias gp='git push' | |
alias gpu='git push -u' | |
alias gpom='git push -u origin master' | |
alias gpo='git push -u origin' | |
## Ansible | |
alias ap='ansible-playbook' | |
alias agi='ansible-galaxy install' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Install with