GKE Cluster Basics¶
Tools¶
You will need up-to-date versions of the following tools installed -
Note
Make sure you have initialized gloud
by running gcloud init
See
this page for details.
Create a Cluster on GKE¶
Creating a kubernetes cluster on GKE is very well documented on this page. In this guide we will be creating a "regional" cluster of 6 nodes.
Step 1¶
By default GKE regional clusters are created in three zones within a region
unless specified otherwise. Please note that the --num-nodes
parameter
specifies the number of nodes per zone, not the total number of nodes.
This page lists the
available GCP regions.
Run the following command to create a 6-node GKE cluster
replacing <CLUSTER_NAME>
and <REGION_NAME>
with a cluster name and
region name of your choice:
Note
A minimum of 4 nodes is required to support a Sawtooth network using the PBFT consensus plugin or a Besu network using IBFT consensus. However smaller clusters can be added to such an existing network
Step 2¶
Make a brew as this is going to take a few minutes.
Step 3¶
When the provisioning is complete, run the following command to generate a
kubeconfig entry for your GKE cluster, replacing <CLUSTER_NAME>
and
<REGION_NAME>
with the name and region of your cluster.
Step 4¶
Run the following command to check your cluster's configuration which should return something akin to the following:
This should return something similar to this
Using your Google GKE Cluster¶
Now that you have created this cluster you can add it to the list of target clusters available to Sextant by following the instructions here.
Alternatively if you intend to install Sextant on this cluster then you can do so by following the instructions here.
Delete Google GKE cluster¶
Warning
Do not delete your GKE cluster if it is running Sextant or it is hosting any Sextant-managed deployments.
Assuming that your GKE cluster isn't running Sextant, then before deleting it, make sure that it isn't hosting any Sextant-managed deployments. If it is, and you still want to delete it, then:
- Undeploy and delete any active deployments running on it using Sextant.
- Delete any provisioned clusters in Sextant.
Run the following command to delete your GKE cluster replacing <CLUSTER_NAME>
and <REGION_NAME>
with the appropriate cluster and region name:
This will return confirmation of the delete operation:
If the cluster listed is correct, press Y
and the delete
operation will commence.
Note
This operation may take some time to complete.