Skip to content

Instantly share code, notes, and snippets.

@dungdt88
Last active December 2, 2019 04:45
Show Gist options
  • Save dungdt88/f1b33e2c90416cada091bcb9e5f3f3af to your computer and use it in GitHub Desktop.
Save dungdt88/f1b33e2c90416cada091bcb9e5f3f3af to your computer and use it in GitHub Desktop.
Kubernetes Cheetsheets

Kubernetes Cheetsheets

Get authorized for a new cluster

  1. List all available clusters
gcloud --project=<project-name> container clusters list
  1. Get credentials for a cluster in the list
gcloud --project=<project-name> container clusters get-credentials <cluster-name> --region <location-field-in-the-list>
  1. List all the contexts in Kubenetes to make sure the new cluster is there
kubectl config get-contexts
  1. Switch to the new cluster:
kubectl config use-context <new-cluster-context>

Forward Port

kubectl port-forward :

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