Skip to content
This repository was archived by the owner on May 17, 2026. It is now read-only.

Google Cloud: Adding a new cluster

Paul Danelli edited this page Feb 24, 2022 · 2 revisions

Please Note: This is a UbiquityPress focused Wiki entry and does not apply to the Open Source Hyku Addons project

Adding a new cluster

Authorising

Via Google Auth

gcloud config configurations activate ubiquityrepo-us
gcloud auth login

Manual

Add config file in $HOME/.config/gcloud/configurations, prefixed with config_.

Example for US cluster. Create the file:

touch $HOME/.config/gcloud/configurations/config_ubiquityrepo-us:

Add the following:

[core]
account = <your_email_address>@ubiquitypress.com
project = repositories-307112

[compute]
zone = us-central1-a
region = us-central1

For AH:

touch $HOME/.config/gcloud/configurations/config_ubiquityrepo-ah:

[core]
account = <your_email_address>@ubiquitypress.com
project = advancinghyku

[compute]
zone = europe-west4-a
region = europe-west4

Activate credentials

Connecting to a cluster is a two part process.

Authenticate to the GCloud project

gcloud config configurations activate ubiquityrepo-us

Get credentials to the cluster:

gcloud container clusters get-credentials cluster-us --zone us-central1-a

Switching between clusters

This is done in a two stage process of selecting the configuration from those available on your machine and activating the cluster:

# Example
gcloud config configurations activate [config_name]
gcloud container clusters get-credentials [cluster_name] --zone [cluster_zone]

To find the correct cluster name and region:

  • login to GCloud and select the project from the top menu.
  • From the left menu select "Clusters"

You will see a table which looks something like

Name        Location        Nodes  CPUs  Memory      Label
cluster-us	us-central1-a	  14	   25	   93.75 GB	   env : prod

Switching between AH/US clusters

For Repositories US:

gcloud config configurations activate ubiquityrepo-us;
gcloud container clusters get-credentials cluster-us --zone us-central1-a

For AH:

gcloud config configurations activate ubiquityrepo-ah;
gcloud container clusters get-credentials cluster-ah --zone europe-west4-a

Clone this wiki locally