...

/

Create a Google Kubernetes Engine (GKE) cluster with jx

Create a Google Kubernetes Engine (GKE) cluster with jx

In the lesson we will discuss how to create a GKE cluster with jx.

GCP project

Everything we do inside a Google Cloud Platform (GCP) is inside a project. That includes GKE clusters. If we are to let jx create a cluster for us, we need to know the name of the GCP project where we’ll put it. If you do not have a project you’d like to use, please visit the Manage Resources page to create a new one. Make sure to enable billing for that project.

Storing project name in an environment variable

No matter whether you created a new project specifically for Jenkins X or chose to reuse one that you already have, we’ll need to know its name. To simplify the process, we’ll store it in an environment variable.

Please make sure to replace [...] with the name of the GCP project before executing the command that follows.

Press + to interact
PROJECT=[...]

Creating a Google Kubernetes Engine (GKE) cluster with jx

Now we’re ready to create a GKE cluster with all the tools installed and configured.

Cluster name and project ID

We’ll name it jx-rocks (-n) and let it reside inside the project we just defined (-p).

Region and machine type

It’ll run inside us-east1 region (-r) and on n1-standard-2 (2 CPUs and 7.5 GB RAM) machines (-m). Feel free to reduce that to n1-standard-1 if you’re concerned about the cost. Since GKE auto-scales nodes, the cluster will scale up if we need more.

Maximum and minimum number of nodes

While on the ...