Last active
February 8, 2022 10:58
-
-
Save etenzy/ab36787e6002fadcb2beb3779d4ae2e4 to your computer and use it in GitHub Desktop.
CK{AD,A,S} Shell setup
This file contains hidden or 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
# in most cases this would be already in the bashrc | |
alias k=kubectl | |
source <(kubectl completion bash) | |
complete -F __start_kubectl k | |
# these exports only work with bash | |
export do="--dry-run=client -o yaml" | |
# usage: k run example nginx $do > example.yaml | |
export now="--force --grace-period 0" | |
# usage: k delete pod example $now | |
# aliases (no completion) | |
alias ktmp="kubectl run tmp --restart=Never --rm -i " | |
# usage: ktmp --image nginx -- curl example.com | |
alias kns="kubectl config set-context --current --namespace " | |
# usage: kns project-x |
This file contains hidden or 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
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab |
This file contains hidden or 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
source ~/.bashrc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment