How to deploy a Kubernetes cluster on the Google Cloud Platform

If you need to deploy a Kubernetes cluster, but you don't have the hardware for it, give Google Cloud Platform a try.

How to deploy a Kubernetes cluster on the Google Cloud Platform

You and your business want to hop onto the Kubernetes bandwagon, but you don't have the resources to do so. Either your data center is already being pushed to its limits or you simply don't have a data center. When that's the case, what do you do? You could always turn to the Google Cloud Platform to make your Kubernetes dreams come true.

There's a certain benefit in taking this route. What is that benefit? You don't have to worry about managing your servers or even installing Kubernetes. That's right, Google has taken care of all that setup for you. You can simply dive into deploying your Kubernetes cluster and begin developing your apps and services.

I want to show you just how easy it is to deploy a Kubernetes cluster on the Google Cloud Platform.

SEE: Hybrid cloud: A guide for IT pros (TechRepublic download)

What you'll need

The only thing you'll need to make this work is a Google Cloud Platform account. You can always sign up for their free 12 month trial (to make sure their Kubernetes offering meets your needs). One nice thing about the 12 month trial is that you won't be automatically billed after the trial is finished. You must manually agree to continue your service, once the trial is over.

How to deploy a cluster 

The first thing to do is to log into your Google Cloud Platform account. Once you've logged in, locate and click on Kubernetes Engine in the left navigation and from the resulting popout menu, click Clusters (Figure A).

Figure A


The Google Cloud Platform dashboard.

A new window will appear informing you the Kubernetes Engine API is being deployed (Figure B).

Figure B


The API is in the act of deployment.

Once the Kubernetes Engine API has deployed (it'll take a few minutes), click Create Cluster. You will then be required to configure your cluster. You can select from a number of options, such as a Standard Cluster, Your First Cluster, CPU Intensive Applications, and more (Figure C).

Figure C


Configuring your cluster.

Make sure to take the time to go through all of the configuration options for the cluster you've chosen. If this is your first cluster, click Your First Cluster and configure the available options. If you want to add nodes to the cluster, make sure to increase the number from 1 to the desired size and then configure the number of cores and their associated memory. 

After you've configured the cluster to meet your specifications, click Create and the cluster will deploy (once again, this will take a few minutes). Once the cluster has deployed, click Connect (Figure D).

Figure D


The Connect button is now available.

After clicking Connect, a window will appear displaying the command you need to run in order to enable command-line access (Figure E).

Figure E


Enabling command-line access. 

Copy that command (it begins with gcloud container), click Run in Cloud Shell, and then in the resulting window (Figure F) click START CLOUD SHELL. 

Figure F


You're almost to the command line.

In the resulting window, the command you copied earlier should automatically appear (Figure G). 

Figure G


The command to enable access is ready.

Hit Enter on your keyboard to run this command.

At this point, you are ready to start working with your Kubernetes cluster. To check to make sure your cluster is running, issue the command:

kubectl get nodes

You should see all of your configured nodes listed (Figure H).

Figure H


Your Kubernetes nodes are ready to go.

And that's all there is to deploying a Kubernetes cluster on the Google Cloud Platform. Enjoy that new-found simplicity and reliability.

Also see


Image: Jack Wallen

By Jack Wallen

Jack Wallen is an award-winning writer for TechRepublic, The New Stack, and Linux New Media. He's covered a variety of topics for over twenty years and is an avid promoter of open source. For more news about Jack Wallen, visit his website jackwallen....