![]() |
VOOZH | about |
We’re so glad you’re here. You can expect all the best TNS content to arrive Monday through Friday to keep you on top of the news and at the top of your game.
Check your inbox for a confirmation email where you can adjust your preferences and even join additional groups.
Follow TNS on your favorite social media networks.
Become a TNS follower on LinkedIn.
Check out the latest featured and trending stories while you wait for your first TNS newsletter.
If you’re learning or tinkering with Kubernetes, you have great options to run Kubernetes with a discount service provider such as Civo, or simply run Kubernetes on your laptop. Yet, running Kubernetes on a major cloud provider is the only way to get the full experience of Kubernetes and gain the critical skills needed for a job using Kubernetes in the cloud.
The options to run Kubernetes at a discount on Amazon Web Services, Azure, and Google Cloud are confusing and ultimately riddled with hidden costs. Additionally, many free credits are temporary. One major benefit of Civo — the cost is fixed and simple to understand. As a learner or tinkerer, you want to keep the costs minimal, under $1 per day if possible.
This article will demonstrate a solution (available on GitHub) for running a full-blown GKE cluster on Google Cloud with a goal to keep the costs under $1 per day. The cluster has three nodes, six cores, and 24GB RAM and is large enough to run nontrivial workloads to learn the critical skills on how to scale applications on Kubernetes.
You can easily deploy the Cheap GKE Solution by using the instructions in the GitHub repo and the provided Terraform configuration. It’s as easy as running terraform init and terraform apply after setting your Google Project ID.
By leveraging steep discounts on Google Cloud, one can achieve over 90% cost savings on running one GKE cluster all-inclusive. Here is a cost-comparison table:
| Service | GKE On Demand | Civo | Cheap GKE Solution |
|
Cluster Specifications |
|||
| # of Control Planes | 1 | 1 | 1 |
| # of Cluster Nodes | 3 | 3 | 3 |
| # of Cluster Cores | 6 | 6 | 6 |
| Total Cluster RAM | 24 GB | 24 GB | 24 GB |
| Storage (All Nodes) | 60 GB Non-SSD | 45 GB SSD | 60 GB Non-SSD |
| Ingress Traffic | Unlimited | 24 TB (Ingress/Egress) | Unlimited |
| Egress Traffic | $0.12 per GB | $0.085 per GB | |
| Cloud Load Balancer | 1 Forwarding Rule | 1 Load Balancer | 1 Forwarding Rule |
|
Monthly Pricing Info (Rounded to Nearest Dollar) |
|||
| 1 Control Plane | $72 | Free | (Free Tier) $0 |
| 3 Cluster Nodes | (On-Demand) $165 | $48 | (Spot VMs) $22 |
| Storage | $3 | (Included) $0 | $3 |
| Cloud Load Balancer | $20 | $10 | (Regional Promo) $0 |
| NAT Gateway | $0 | N/A | $3-4 |
| Cloud Logging | (After Free Tier) $20 | N/A | $0 |
| Total | $208-280 (+ egress) | $58 | $23-24 (+ egress) |
As you can see, at $24 per month, the Cheap GKE Solution is less than half the cost of a comparable Civo deployment, provided that you use minimal data egress. However, you should examine the information for Spot VMs on the Compute Engine Pricing page to see how your referred region compares. us-west4 is currently the cheapest region with asia-east2 being slightly more expensive.
To help understand and predict charges for running the Cheap GKE Solution, here is the cost breakdown per GCP SKU on a daily basis. Data processing charges apply to external service calls from GKE, such as pulling images from Docker Hub. If you pull images frequently, using Artifact Registry is advised to keep NAT Gateway Data Processing charges low.
|
Google Cloud SKU |
Cost Per Day |
|
Spot Preemptible E2 Instance Core running in Las Vegas |
$0.35 |
|
Spot Preemptible E2 Instance Ram running in Las Vegas |
$0.19 |
|
Storage PD Capacity in Las Vegas |
$0.09 |
|
NAT Gateway: Uptime charge in Las Vegas |
$0.10 |
|
NAT Gateway: Data processing charge in Las Vegas |
($0.045 per GB) $0.03 |
|
Network Internet Egress from Las Vegas to Americas |
($0.085 per GB) $0.01 |
|
Total |
($23.10/month) $0.77 |
OK, so you can run a genuine GKE cluster at minimal cost with the Cheap GKE Solution. What are some of the things that you can do with this cluster given that it has a nontrivial six core and 24GB of RAM?
By having a larger cluster with more CPU and RAM, new doors open up to learners and tinkerers on workloads they can feasibly run on their Kubernetes cluster.
Details on how the Cheap GKE Solution works are heavily documented in the GitHub repo. There are four primary drawbacks that you should remember:
As I stated previously, the Cheap GKE Solution is primarily for learners and tinkerers of GKE. While the cost savings are great, there are significant drawbacks to keep in mind when operating the cluster.
The provided Cheap GKE Solution has a scalable pricing model. You could, for example, run a six node, 24 core, 96GB RAM cluster for about $100 per month. The more nodes that you run, the less likely you will be severely impacted by concurrent node replacements. For a super-savvy startup that is great at building fault-tolerant applications, using the Spot VM nodes is very appealing. You can also combine with non-Spot VM node pools for handling stateful workloads. So, the Cheap GKE Solution may provide some compelling ideas for those under tight budget constraints that are willing to accept the risks.
Give the Cheap GKE Solution a try using the instructions in the GitHub repo. If you let it run for a few days in its own Google Cloud project, it will be easy to examine the cost of running the cluster. Provided that you only have one GKE cluster running, you can expect to have a great Kubernetes cluster for under $1 per day.