Prerequisites
- Have
gcloud
CLI tool installed.- Have
kubectl
CLI tool installed- Be able to login into
Connecting
- Login to
gcloud
withpcloud auth login
. This will open up a browser and let you log in into your service account. - Set your project with
gcloud config set projects <PROJECT>
- You can find your project with
gcloud projects list
- You can find your project with
- Set your zone
- Find your cluster with
gcloud container clusters list
- Describe your cluster
gcloud container clusters describe <CLUSTER>
- Set your zone
gcloud config set compute/zone <ZONE>
europe-west3
is a valid option, even if it isn’t listed or gives warnings, trust the description output.
- Find your cluster with
- Setup kubectl with
gcloud container clusters get-credentials <CLUSTER>
- Optional: Setup ArgoCD user credentials with
kubectl config set-credentials argocd-user --username=<USERNAME> --password=<PASSWORD>
- Create KubeCTL context with
kubectl config set-context <CONTEXT_NAME> --cluster=<CLUSTER> --user=<USER>
- Use created context with
kubectl config use-context <CONTEXT_NAME>
- 🎉 you can for example use
k9s
now.