PRODUCTS & SERVICES

Tips for businesses on 4 ways to optimize the potential of Google Kubernetes Engine

Oct 04, 2023

CMC Telecom expert shares how to take full advantage of the potential of Google Kubernetes Engine (GKE) to effectively manage costs and solve difficult problems for many businesses today.

GKE is a powerful platform that enables the deployment and management of applications built on containers on Google Cloud Platform (GCP). However, for many businesses, making the most of GKE’s potential to maintain efficiency in cost management is always a difficult problem.


According to Mr. Ngo Quoc Thai – Director of CMC Telecom’s MultiCloud Service Deployment and Consulting Center: The problem of excess resources in GKE is because many businesses do not have experience deploying and operating on GCP; or often encounter problems such as: non-optimal architectural design, configuration not adjusted effectively for Pods (default), lack of system monitoring system, failure to manage old resources… For example: Enterprises run multiple applications on the same cluster, which can lead to too much resource allocation for each application.

Mr. Ngo Quoc Thai gave 4 methods to optimize resources and costs on GKE.

Enable the “optimize utilization” autoscaling feature on GKE

Setting up the right amount of vCPU and RAM is always one of the key methods to reduce the cost of using GKE. However, this is extremely difficult if users do it by manually monitoring and fine-tuning. Therefore, GKE has integrated a user support feature to solve this problem called “optimize utilization”.

In addition, according to average statistics across the entire system, Google also shows that user clusters with optimize utilization enabled can reduce vCPU and RAM by 20% compared to the average. This is simple to do but brings high performance, we can enable it right when creating the cluster or edit it on the active cluster itself as below.


How to enable the Optimize Utilization feature on the cluster’s autoscaling profile

Take advantage of Cost Optimization Insights

While running a workload on GKE, users can take advantage of the “Cost Optimization Insights” feature directly from the GKE console. This makes it convenient to track and analyze CPU and Memory (GB) usage across clusters and workloads. From there, it’s easy to identify opportunities to optimize resource allocation.


Cost Optimization interface on GKE

To make good use of the above feature, users can view the list of measurements listed below.


Application segmentation and packaging: From the Insights interface, we can take advantage of the “used” bar (light gray) in the “cluster view” mode to see the amount of resources used. From there, users need to divide the correct amount of resources needed for the cluster and reduce the size of application packages, helping to save costs better.

Adjust application size: Users do this by observing the “requested” (blue) bar in cluster/workload views to set the correct amount of resources needed for pods and threshold for autoscaling. This helps free up more space in the cluster.

Use GKE Autopilot

In fact, reducing infrastructure costs is an easy matter. But reducing costs and saving personnel time in operation while still ensuring system stability is not simple. That is why the GKE Autopilot service was born. This service helps operate and calculate prices based on the number of pods required to use, then the system will calculate the amount of resources the application needs to provide and immediately eliminate excess infrastructure costs.

On the other hand, GKE Autopilot is operated based on best practices from Google, helping users new to Google and using GKE set up an accurate and safe environment.

Take advantage of preemptible VMs

Preemptible VMs are virtual machines that are much cheaper than regular virtual machines (up to 80%) but they can be terminated at any time usually from 1 to 24 hours (if resource demand is high). . Preemptible VMs are often suitable for short-term tasks such as: Batch/data processing, load testing… Therefore, users must be careful to save as soon as tasks are completed and ensure that they can be restarted at any time.


Mr. Ngo Quoc Thai said, CMC Telecom is a senior partner of Google, and has currently provided in-depth information on 4 methods to help optimize costs when using GKE. From reality, GCP has now developed and introduced many new features and tools to help reduce the amount of resources as well as save operating time.

“In addition, if users continuously combine resource optimization measures with optimizing source code, libraries and frameworks from the ground up, they can ensure the system always operates efficiently while still being the most economical. ”, CMC Telecom’s GCP solution expert emphasized.