Kubernetes shortcuts

Creating alias for Kubectl

alias k=kubectlk get pods

This will persist until you log out. To save this alias, add it to your .bashrc or .profile file.

Creating a alias to set the context

kubectl config set-context --current --namespace fooalias kubens='kubectl config set-context --current --namespace 'alias kns=kubens

Reference: https://medium.com/james-reads-public-cloud-technology-blog/3-basic-kubernetes-shortcuts-for-faster-command-line-kung-fu-5c041295ea78

Post a Comment

Previous Post Next Post