Creating a Kubernetes Cluster

This page shows how to run Kubernetes on Google Kubernetes Engine (GKE)

Installing Google Cloud SDK

To install gcloud and kubectl, perform the following steps:

  1. Install the Cloud SDK, which includes the gcloud command-line tool.

  2. Install the kubectl command-line tool

$ gcloud components install kubectl

Configure default settings

Here we set the project id that will be the home for our Kubernetes nodes and the primary geographic zone for the cluster.

PROJECT_ID=beaconchain

CLUSTER_NAME=cardano
CLUSTER_ZONE=us-central1-a

# Setting a default project ID
$ gcloud config set project $PROJECT_ID

# Setting a default compute zone or region
$ gcloud config set compute/zone $CLUSTER_ZONE

Creating a GKE cluster

Lets create a single zone cluster with two medium size nodes.

Great, to install Kubernetes on two nodes and network them together to form a cluster took about 1min.

Get credentials for the cluster

We should now be able to use the kubectl command

Last updated

Was this helpful?