Deploy, Scale, and Update Your Website on Google Kubernetes Engine

Komal Agrawal
2 min readOct 18, 2022

Kubernetes

Kubernetes is a portable, extensible, open source platform for managing containerized workloads and services, that facilitates both declarative configuration and automation. It has a large, rapidly growing ecosystem. Kubernetes services, support, and tools are widely available.

Google Kubernetes Engine (GKE) provides a managed environment for deploying, managing, and scaling your containerized applications using Google infrastructure.

Deploy container to GKE

To deploy and manage applications on a GKE cluster, you must communicate with the Kubernetes cluster management system. You typically do this by using the kubectl command-line tool.

Kubernetes represents applications as Pods, which are units that represent a container (or group of tightly-coupled containers). The Pod is the smallest deployable unit in Kubernetes.

To deploy your application, create a Deployment resource. The Deployment manages multiple copies of your application, called replicas, and schedules them to run on the individual nodes in your cluster. Deployments ensure this by creating a ReplicaSet. The ReplicaSet is responsible for making sure the number of replicas specified are always running.

Expose GKE deployment

You have deployed your application on GKE, but there isn’t a way to access it outside of the cluster. By default, the containers you run on GKE are not accessible from the Internet because they do not have external IP addresses.

You must explicitly expose your application to traffic from the Internet via a Service resource. A Service provides networking and IP support to your application’s Pods. GKE creates an external IP and a Load Balancer for your application.

Scale GKE deployment

Now that your application is running in GKE and is exposed to the internet, imagine your website has become extremely popular! You need a way to scale your application to multiple instances so it can handle all this traffic.

GKE’s rolling update

GKE’s rolling update mechanism ensures that your application remains up and available even as the system replaces instances of your old container image with your new one across all the running replicas.

In the below video, you will learn how to Deploy, Scale, and Update Your Website on Google Kubernetes Engine.

Video Link: https://www.youtube.com/watch?v=Nk4rQFdDmCI

Steps to Deploy, Scale, and Update Your Website on Google Kubernetes Engine.

Task 1. Create a GKE cluster
Task 2. Clone source repository
Task 3. Create Docker container with Cloud Build
Task 4. Deploy container to GKE
Task 5. Expose GKE deployment
Task 6. Scale GKE deployment
Task 7. Make changes to the website
Task 8. Update website with zero downtime
Task 9. Cleanup

Done !!!

If you want to know more, you can refer the below docs

Thank you :)

--

--

Komal Agrawal

Test Engineer @HCLTech, GCP DevOps Certified, Reader & Writer