GKE cluster setup


Overview

This section provides instructions for setting up the Google Kubernetes Engineexternal link (GKE) for use with the CAST Imaging helm charts installation scripts described in Installation on Google Cloud Platform via GKE.

Setup GCP CLI

gcloud init

Create cluster

#!/bin/bash

# Set your project ID
PROJECT_ID="your-project-id"
# Set your preferred region or zone
REGION="us-east1"
ZONE="us-east1-b"
# Set your cluster name
CLUSTER_NAME="my-gke-cluster"

# Configure gcloud to use your project
gcloud config set project $PROJECT_ID

# Create the GKE cluster
gcloud container clusters create $CLUSTER_NAME \
    --zone=$ZONE \
    --num-nodes=2 \
    --machine-type=e2-standard-8 \
    --disk-type=pd-standard \
    --disk-size=100GB \
    --enable-autoscaling \
    --min-nodes=2 \
    --max-nodes=4 \
    --scopes=https://www.googleapis.com/auth/cloud-platform \
    --addons=HttpLoadBalancing,GcpFilestoreCsiDriver

# Verify cluster creation
gcloud container clusters list

# Get credentials to interact with the cluster
gcloud container clusters get-credentials $CLUSTER_NAME --zone=$ZONE

# Verify nodes
kubectl get nodes

Install kubectl - commandline K8s tool

gcloud components install gke-gcloud-auth-plugin
  • Test the cli is working by running: kubectl version --short --client (Linux) or kubectl.exe version --short --client (Microsoft Windows)

Install Helm