Welcome to the Linux Foundation Forum!

Setting up a GKE cluster in 2024

The Installation and Configuration page for GKE is a little out of date. Here are the challenges I encountered getting set up in GKE:

  1. The course instructs you to start with Google's Quick Start, which walks you through creating an autopilot cluster (create-auto). The course then instruct you to create a normal cluster (create). Use create.
  2. Attempting to run the full gcloud container clusters create linuxfoundation results in a quota exception "Insufficient regional quota to satisfy request: resource "SSD_TOTAL_GB": request requires '900.0' ... You can get around this by specifying a single zone for the cluster (rather than an entire region and all of its zones).
  3. When the cluster deploys, you get the warning "CRITICAL: ACTION REQUIRED: gke-gcloud-auth-plugin ... was not found..." with a link to instructions for installing that plugin to use kubectl.

The steps I followed to get my cluster running (note that I have multiple
GCP projects, so there are some commands to deal with that):

  1. In the GCP console, create a new project. I called mine "lfs-258-0"
  2. In the GCP console, enable the Artifact Registry and GKE APIs
  3. Decide whether you want to use the GCP cloud shell (turnkey shell with gcloud CLI already installed and other conveniences), or run commands locally. I chose the latter.
  4. On your PC/Mac, install the gcloud CLI client
  5. Run the following commands:
gcloud projects list
gcloud set project lfs-258-0
gcloud auth application-default set-quota-project lfs-258-0
sudo apt-get install google-cloud-sdk-gke-gcloud-auth-plugin
gcloud compute regions list
gcloud compute zones list --filter="name~'^us-west'"
gcloud container clusters create linuxfoundation --location us-west1-a
kubectl get nodes -o wide

Good luck!

Comments

  • asciimo
    asciimo Posts: 4

    Ha. And now I get to Lab 3.1 which walks you through setting up Kubernetes on VMs. Surprise!

Categories

Upcoming Training