Last active
September 25, 2023 13:25
-
-
Save edib/4df7d98fca9e3e53bf532014d295442b to your computer and use it in GitHub Desktop.
This file contains 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
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" | |
sudo mv kubectl /usr/bin/ | |
sudo chmod +x /usr/bin/kubectl | |
mkdir .kube | |
sudo cp /etc/kubernetes/admin.conf .kube/config | |
kubectl get node |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
alias a='alias'
alias k='kubectl '
alias ka='kubectl apply -f '
alias kaf='kubectl apply -f '
alias kcf='kubectl create -f '
alias kd='kubectl delete '
alias kdf='kubectl delete -f '
alias kg='kubectl get '
alias kgd='kubectl get deployments'
alias kgn='kubectl get nodes'
alias kgnl='kubectl get nodes --show-labels'
alias kgnw='kubectl get nodes -o wide'
alias kgp='kubectl get pods'
alias kgpa='kubectl get pods --all-namespaces'
alias kgs='kubectl get svc'
alias kl='kubectl logs'
alias klf='kubectl logs -f'
alias kns='function __kubens() { kubectl config set-context --current --namespace="$1"; }; __kubens'
alias kx='function __kexec() { kubectl exec -it $1 -- bash; }; __kexec'
alias kxa='function __kexec() { kubectl exec -it $1 -- ash; }; __kexec'
alias kxs='function __kexec() { kubectl exec -it $1 -- sh; }; __kexec'