Skip to content

Instantly share code, notes, and snippets.

@anhquan99
Forked from JamieMac96/bashrc
Last active July 5, 2024 06:49
Show Gist options
  • Save anhquan99/6b4bb474f72317103ebcafab5687529e to your computer and use it in GitHub Desktop.
Save anhquan99/6b4bb474f72317103ebcafab5687529e to your computer and use it in GitHub Desktop.
CKA-Bashrc
alias k="kubectl"
alias v="vim"
complete -F __start_kubectl k
function ns () {
kubectl config set-context --current --namespace=$1
}
function cluster(){
kubectl config use-context $1
}
export drc="--dry-run=client -o yaml"
export now="--grace-period 0 --force"
export do="kubectl apply -f"
export r="kubectl replace --force -f" # replace
export rt="-it --rm --restart=Never" # run test
export test="k apply --validate=true --dry-run=server -f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment