A client recently reached out to us with a challenge: their Google Cloud Platform (GCP) costs were higher than expected, and they needed help reducing them. They were running three large Kubernetes clusters for development, testing, and production. Surprisingly, our analysis revealed that the development and testing clusters were more expensive than the production cluster.
The Problem: High Costs in Non-Production Clusters
The root cause was how the development and testing clusters were set up. Similar to the production cluster, these environments were spread across multiple zones within a single region. However, the high number of application tests in development and testing environments generated substantial inter-zonal traffic, which led to increased costs.
Additionally, the client used GCP Filestore (Managed NFS) for persistent storage to support deployments across multiple zones. While effective, this solution added unnecessary expenses for non-production environments.
Our Solution: A Practical and Cost-Effective Approach
After discussing the findings with the client, we identified areas where cost reductions could be made without compromising functionality. Since development and testing environments did not require the same level of high availability as production, we proposed two key changes:
- Switching to Zonal Clusters: By running the development and testing clusters in a single zone, we could significantly reduce inter-zonal traffic and its associated costs.
- Migrating from GCP Filestore to Persistent Disks: Persistent disks are a more cost-effective alternative for zonal clusters, as they seamlessly support node-to-node data sharing within the same zone.
Implementation and Results
With the client’s approval, we implemented these changes:
- Configured the development and testing clusters to run in a single zone.
- Replaced Filestore with persistent disks for zonal storage.
- Ensured all services continued to run smoothly during the transition.
These adjustments led to a significant reduction in GCP costs while maintaining the required performance for development and testing environments.
The Outcome: Optimized Costs and Infrastructure
This collaborative approach resulted in a 43% cost reduction for testing and development Kubernetes clusters! It not only saved the client money but also tailored their infrastructure to better suit their needs. By prioritizing efficiency and cost-effectiveness, we helped the client achieve their goals while maintaining a high standard of performance.
Author: Andrei Ivanouski
If you are looking to optimize your Kubernetes or cloud infrastructure, reach out to us today!