Genreal Aliases
# For listing folders
alias l="ls -al"
# To open vscode from any folder
alias e="code"
# open and edit my bashrc file in vscode
alias ebash="e ~/.bashrc"
# Apply my bashrc changes to current bash session
alias sbash="source ~/.bashrc
Kubernetes Aliases
# Kubectl: simple alias to the kubectl command
alias k="kubectl"
# KubectlGetPods: get all the pods for the current namespace
alias kgp="k get pods"
# KubectlSearchPods: find a specific pod. example: "ksp promethius"
alias ksp="kgp | grep"
# KubectlGetDeployment: get all the deployments
alias kgd="k get deployments"
# KubectlSearchDeployment: find a specific deployment. example: "ksd promethius"
alias ksd="kgd | grep"
# KubectlGetNamespaces: get all the namepsaces
alias kgn="k get namespaces"
# KubectlSearchNamespaces: find a specific namespace. example: "ksn system"
alias ksn="kgn | grep"
# KubectlGetConfigmap: get all of the configmaps
alias kgcm="k get cm"
# KubectlSearchConfigmap: find a specific configmaps. Example: "kscm promethius"
alias kscm="kgcm | grep"
# KubectlGetServies: Get all the services for the current namespace
alias kgs="k get services"
# KubectlSearchServices: Find a specific service. Example: "kss promethius"
alias kss="kgs | grep"
# KubectlEditService: Edit a service: Example: "kes promethius"
alias kes="k edit services"
# KubectlGetVirtualservices: Gets all of the virtualservices
alias kgvs="k get virtualservices"
# KubectlSearchVirtualservices: find a specific virtualservice
alias ksvs="kgvs | grep"
# KubectlEditVirtualservice: Edit a specific virtual service
alias kevs="k edit virtualservices"
Kubernetes Functions
# KubectlCluster: set the cluster context
kc() {
k config use-context kubelet-cluster.$1
}
#KubectlNamespace: set the namespaces globally
kn() {
k config set-context --current --namespace=$1
}
Kubernetes Variable
Use Vscode when editing kubernetes files
export EDITOR='code --wait'
Maven Aliases
# MavenInstall: doing a clean install
alias mi="clear && mvn clean install"
# MavenInstallSkip: do a clean install but skip tests
alias mis="clear && mvn clean install -DskipTests"
# MavenReleaseTest: Do a test/dryrun release to insure everything is functional.
alias mrelt="mvn release:clean release:prepare -DpushChanges=false -DdryRun=true"
# MavelRelease: run the maven release procedures
alias mrel="mvn release:clean release:prepare -DpushChanges=false"