Introduction to GCP Kubernetes Engine

Lab Details:

  1. This lab walks you through Google Kubernetes Engine, how it is different from App Engine.

  2. You will be creating a basic application in Python.

  3. Finally, you will deploy your application to the Cluster.

  4. Region: us-central1

  5. Duration: 45 minutes

Note: Do not refresh the page after you click Start Lab, wait for a few seconds to get the credentials.
In case while login into Google, if it asks for verification, please enter your mobile number and verify with OTP, Don't worry this Google Account will be deleted after the lab.

What is Google Kubernetes Engine?

  •  Kubernetes is an open-source orchestration tool for containers that offers you better management and scaling of your application. 

  • Kubernetes allows you to deploy containers on a set of nodes called a cluster.  The node represents a computing instance.

  • In Short, Kubernetes is called K8S.

  • Kubernetes deploys a container in a pod. A pod is the smallest deployable unit in the K8s.

  • Each pod in Kubernetes get a unique IP address 

  • Here deployment simply means a set of replica of the same pod, it always keeps your pod running if the node fails e.g. active-passive combination. By default pods are accessible only inside your cluster, to make pods accessible publicly, you can connect a load balancer to it, Kubernetes then creates a fixed IP address for your pod, this type of LoadBalancer is Network Load Balancer. 

  • A service group a set of pods together as shown in the below architecture diagram and make a common endpoint for them.

The above scenario is not used in real-time projects, it is for learning only, the main strength of Kubernetes is to set a configuration file and let Kubernetes do whatever you need instead of running the commands, these config files become your management tools, to make a change edit the config file and present the change to Kubernetes 

Google Kubernetes Engine vs Google App Engine :

  • GKE(Google Kubernetes Engine) is simply cluster management and orchestration tool for running your Docker containers whereas GAE(Google App Engine) is a google managed container.

  • They both try to provide you similar benefits but with management differences. GKE tries to provide you more control over everything in your clusters whereas GAE tries to get you run your apps up and running with as management as possible.

  • The drawback with GKE is that you have more control, so more work for you. You need to configure everything including the network, security, software packages, etc. whereas, with GAE, you can focus on your app.

  • In this sense, GKE is more flexible in what you can achieve. But, as a developer, you might not be interested in the infrastructure at all, you are only focused that your application works and scales, for this purpose App Engine Flexible is more preferred.

  • Another difference of GKE is that you can run multiple applications within the same cluster whereas in App Engine you are charged for each app deployed.

Architecture Diagram:

Lab Tasks:

  1. Login into GCP Console.

  2. Starting Cloud Shell.

  3. Creating a basic python application.

  4. Building a docker image.

  5. Creating a cluster with 2 nodes and deploying the image.

  6. Testing the API.

Join Whizlabs_Hands-On to Read the Rest of this Lab..and More!

Step 1 : Login to My-Account
Step 2 : Click on "Access Now" to view the course you have purchased
Step 3 : You will be taken to our Learn Management Solution (LMS) to access your Labs,Quiz and Video courses

Open Console