Skip to content

Instantly share code, notes, and snippets.

@rfahham
Created December 8, 2023 18:08
Show Gist options
  • Save rfahham/221e347dbdfb1e3453e8b6d529c59582 to your computer and use it in GitHub Desktop.
Save rfahham/221e347dbdfb1e3453e8b6d529c59582 to your computer and use it in GitHub Desktop.
alias para facilitar o dia-a-dia de quem trabalha com kubernetes
Acrescente as linhas abaixo no arquivo: ~/.zshrc
$ vi ~/.zshrc
alias k="kubectl"
alias kapply="kubectl apply -f"
alias kdel="kubectl delete"
alias kpd="kubectl describe pod"
alias kexec="kubectl exec -it"
alias klogs="kubectl logs"
alias kgcm="kubectl get configmaps"
alias kgd="kubectl get deployments"
alias kgns="kubectl get namespace"
alias kgn="kubectl get nodes"
alias kgnw="kubectl get nodes -o wide"
alias kgp="kubectl get pods"
alias kgpn="kubectl get pods -n "
alias kgpw="kubectl get pods -o wide"
alias kpv="kubectl get pv"
alias kgsec="kubectl get secrets"
alias kgs="kubectl get services"
alias kpf="kubectl port-forward"
alias kscale="kubectl scale deployment --replicas"
alias ktn="kubectl top nodes"
Atualize o ambiente shell digitando o comando abaixo:
$ source ~/.zshrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment