Prerequisites

  • Have gcloud CLI tool installed.
  • Have kubectl CLI tool installed
  • Be able to login into google

Connecting

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

References

fleeting-2023-11-14