Last active
November 2, 2019 13:29
-
-
Save yohangdev/4c53c31c6edfba887dc0001c36e28f9a to your computer and use it in GitHub Desktop.
Kubernetes Cheatsheet
This file contains hidden or 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://storage.googleapis.com/kubernetes-release/release/v1.16.0/bin/darwin/amd64/kubectl | |
chmod +x ./kubectl | |
sudo mv ./kubectl /usr/local/bin/kubectl | |
kubectl version | |
# Latest provider | |
# Amazon EKS 1.14.7 | |
# GCP GKE 1.14.7 | |
minikube start --vm-driver=virtualbox --memory=8192 --kubernetes-version=1.14.7 | |
minikube ip | |
kubectl get pods -A | |
kubectl get deployments | |
kubectl get svc | |
kubectl get ing | |
kubectl logs -f X | |
kubectl describe X Y | |
kubectl exec | |
kubectl apply -f deploy.yaml | |
kubectl delete -f deploy.yaml | |
# homebrew switch | |
https://www.benpickles.com/articles/72-downgrading-kubectl-with-homebrew | |
https://gist.github.com/rdump/b79a63084b47f99a41514432132bd408 | |
# istio kiali | |
kubectl label namespace default istio-injection=enabled | |
kubectl -n istio-system port-forward $(kubectl -n istio-system get pod -l app=kiali -o jsonpath='{.items[0].metadata.name}') 20001:20001 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment