kubectl.plugin.zsh 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. # Autocompletion for kubectl, the command line interface for Kubernetes
  2. #
  3. # Author: https://github.com/pstadler
  4. if [ $commands[kubectl] ]; then
  5. source <(kubectl completion zsh)
  6. fi
  7. # This command is used ALOT both below and in daily life
  8. alias k=kubectl
  9. # Drop into an interactive terminal on a container
  10. alias keti='k exec -ti'
  11. # Manage configuration quickly to switch contexts between local, dev ad staging.
  12. alias kcuc='k config use-context'
  13. alias kcsc='k config set-context'
  14. alias kcdc='k config delete-context'
  15. alias kccc='k config current-context'
  16. # Pod management.
  17. alias kgp='k get pods'
  18. alias klp='k logs'
  19. alias kep='k edit pods'
  20. alias kdp='k describe pods'
  21. alias kdelp='k delete pods'
  22. # Service management.
  23. alias kgs='k get svc'
  24. alias kes='k edit svc'
  25. alias kds='k describe svc'
  26. alias kdels='k delete svc'
  27. # Secret management
  28. alias kgsec='k get secret'
  29. alias kdsec='k describe secret'
  30. alias kdelsec='k delete secret'
  31. # Deployment management.
  32. alias kgd='k get deployment'
  33. alias ked='k edit deployment'
  34. alias kdd='k describe deployment'
  35. alias kdeld='k delete deployment'
  36. alias ksd='k scale deployment'
  37. alias krsd='k rollout status deployment'
  38. # Rollout management.
  39. alias kgrs='k get rs'
  40. alias krh='k rollout history'
  41. alias kru='k rollout undo'