image
Creating a Single-Zone Cluster
Start course
Difficulty
Beginner
Duration
55m
Students
1909
Ratings
4.4/5
starstarstarstarstar-half
Description

This course has been designed to teach you how to deploy and implement Google Cloud Platform solutions. The content in this course will help prepare you for the Associate Cloud Engineer exam.

Learning Objectives

  • To learn how to deploy Kubernetes Engine resources on Google Cloud Platform
  • To learn how to deploy and implement App Engine and Cloud Functions resources
  • To learn how to use Cloud Launcher and Deployment Manager

Intended Audience

  • Those who are preparing for the Associate Cloud Engineer exam
  • Those looking to learn more about GCP networking and compute features

Prerequisites

To get the most from this course then you should have some exposure to GCP resources, such as Kubernetes Engine, App Engine, Cloud Functions, Cloud Launcher, and Deployment Manager. However, this is not essential.

Transcript

In the previous lesson, we covered the different types of cluster templates that are available to us. In this demonstration, I'm going to create a single-zone cluster using one of those templates. To get started, I need to browse to the Google Kubernetes Engine menu in GCP console. From here, I just need to browse to Clusters and then click Create Cluster. 

After clicking Create Cluster, I have several cluster templates to choose from, and they are here on the left hand side. We covered these templates in the earlier lesson, so I'm not going to bore you with them again. What I'm going to do for this exercise is choose the Standard cluster template. To customize my template, I need to provide a unique name for my cluster along with a location type. I'm going to call my cluster mygkecluster and I'm going to select Zonal for my location type. 

After setting my zone type, I can specify the zone where I want to deploy my cluster here. 

This master version dropdown allows me to choose the cluster master version for mygkecluster. The master version that I select here will determine the version of Cloud Run on GKE that is installed when I create the cluster. You should always use a version with the latest supported version of Cloud Run, so for this exercise, I'll leave it at the default setting. 

What I need to do here is specify my node pool settings. Each node pool is a separate instance group running Kubernetes in the cluster. 

For this exercise, I'll leave it set to three nodes, I'll also need to specify the machine type to use for my instances. Now, I should point out that each machine type is built differently, so keep that in mind when deploying resources. As you can see here, the default machine type features one CPU and 3.75 gig of ram. I'm going to leave this at the default setting and then just click create to deploy my cluster. 

Once I've created a cluster in the GCP console, I'll need to configure kube control to interact with the cluster. To do this, I need to create a kubeconfig entry. To create this entry, I need to launch Cloud Shell. 

Once this cluster is up and running, we'll launch Cloud Shell and I'll show you how to create a kubeconfig entry. Okay, now that our cluster has been created and is active, what I'll do here is launch Cloud Shell, and let me paste the command down here. So like I was saying, what we need to do is create a kubeconfig entry for our cluster to allow kube control to interact with the cluster, so we can run commands against it. 

This gcloud container clusters command, what it does is retrieves the credentials for mygkecluster, now when I run this command, I also have to specify the region in which the cluster resides, in this case, we deployed to the us-central1-a. So we'll go ahead and hit Enter here. This command doesn't return a whole lot of information, but what it does do is tell us that it's fetching the cluster end-point and authentication data. It's also telling me that the kubeconfig entry has been generated for mygkecluster, so by doing this, this allows me to later on, if I want to manage my cluster using kube control, I can use kube control to interact with the cluster, and since I've created the kubeconfig entry here, my deployment is now complete and I can run individual kube control commands against the cluster.

About the Author
Students
81999
Courses
86
Learning Paths
63

Tom is a 25+ year veteran of the IT industry, having worked in environments as large as 40k seats and as small as 50 seats. Throughout the course of a long an interesting career, he has built an in-depth skillset that spans numerous IT disciplines. Tom has designed and architected small, large, and global IT solutions.

In addition to the Cloud Platform and Infrastructure MCSE certification, Tom also carries several other Microsoft certifications. His ability to see things from a strategic perspective allows Tom to architect solutions that closely align with business needs.

In his spare time, Tom enjoys camping, fishing, and playing poker.

Covered Topics