?? Day 3: Streamline your workflow with kubectl-aliases

kubectl-aliases?is a collection of aliases for?kubectl?that can drastically speed up your workflow and simplify Kubernetes cluster management. These aliases enable shorter syntax for frequently used?kubectl?commands, saving time and improving efficiency.

To get started with?kubectl-aliases, follow these steps:

1/ Clone the?kubectl-aliases?repository:

git clone https://github.com/ahmetb/kubectl-aliases.git ~/kubectl-aliases        

2/ Add the aliases to your shell configuration (~/.bashrc,?~/.zshrc, or the equivalent for your shell):

echo 'source ~/kubectl-aliases/.kubectl_aliases' >> ~/.bashrc
source ~/.bashrc        

Some notable aliases included:

  1. kgp?- List all pods (kubectl get pods)
  2. kgd?- List all deployments (kubectl get deployments)
  3. kgs?- List all services (kubectl get services)
  4. krmallp?- Delete all pods (kubectl delete pods --all)

Check the?official GitHub repository?for a comprehensive list of available aliases.

Integrating?kubectl-aliases?into your workflow can save time and make Kubernetes management much more convenient.

Stay tuned for more DevOps Tips & Tricks!

#devops #tipsandtricks #kubernetes #kubectl-aliases

Vincent Van der Kussen

Cloud and Site Reliability Engineer ?? Not looking for new opportunities

1 年

You forgot to mention the most basic of all :) `alias k='kubectl'`

要查看或添加评论,请登录

社区洞察

其他会员也浏览了