Thursday, December 19, 2019

Shortcuts for kubectl for bashrc

alias k=kubectl
alias kp='kubectl get pods'
alias ks='kubectl get services'
alias kn='kubectl get ns'

function kexec() {
        kubectl exec $1 -it -- /bin/sh
}


function kdelete() {
        kubectl delete pod $1 --grace-period=0 --force
}
function krun() {
        kubectl run $1 --image=$2 --restart=Never --dry-run -o yaml
}
function kapply() {
        kubectl apply -f $1
}

No comments:

Popular micro services patterns

Here are some popular Microservice design patterns that a programmer should know: Service Registry  pattern provides a  central location  fo...