This lab walks you through Google Kubernetes Engine, how it is different from App Engine.
You will be creating a basic application in Python.
Finally, you will deploy your application to the Cluster.
Duration: 45 minutes
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
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.
Login into GCP Console.
Starting Cloud Shell.
Creating a basic python application.
Building a docker image.
Creating a cluster with 2 nodes and deploying the image.
Testing the API.