Skip to content

Instantly share code, notes, and snippets.

@upkarlidder
Forked from AnthonyAmanse/alias-kubernetes
Created February 12, 2019 21:45
Show Gist options
  • Save upkarlidder/94569a7a68c6bf768a39b3c814267e23 to your computer and use it in GitHub Desktop.
Save upkarlidder/94569a7a68c6bf768a39b3c814267e23 to your computer and use it in GitHub Desktop.
# I put them in my shell profile
# I use zsh so it's in ~/.zshrc
# for bash, it might be in ~/.bash_profile
alias k='kubectl'
alias ka='kubectl apply -f'
alias kex='kubectl exec -ti'
alias kl='kubectl logs'
alias kg='kubectl get'
alias kgp='kubectl get pods'
alias kgs='kubectl get services'
alias kgd='kubectl get deploy'
alias kgsec='kubectl get secrets'
alias kgcm='kubectl get cm'
alias kd='kubectl describe'
alias kdp='kubectl describe pods'
alias kds='kubectl describe services'
alias kdd='kubectl describe deploy'
alias kdsec='kubectl describe secrets'
alias kdcm='kubectl describe cm'
# You'll need to be logged in the bx/ibmcloud cli
# this gets the list of clusters
alias kclusters='ibmcloud cs clusters'
# this downloads the kubectl config and applies them in current session
# usage would be "kcluster <CLUSTER_NAME>"
kcluster () { $(ibmcloud cs cluster-config $@ | grep export) }
function main(args) {
return { greeting : 'hello world'};
}
@AnthonyAmanse
Copy link

Hey!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment