I have two GKE autopilot clusters. One is using performance compute class while other is using general Purpose Compute class.
This is what GCP kubernetes clusters list view shows the usage for both.
For Performance
12.05 vCPU | 17.63 GB |
---|
For general purpose
15 vCPU | 26 GB |
---|
when I deploy my workloads on performance nodes I get to specify lower requests and limits(128MB/250vCPU), as opposed to what General purpose forces me to run my workload at minimum 512MB/250vCPU. Naturally, I can see, Cluster using Performance nodes is using lesser resources as compared to general Purpose. All good so far.
Now lets talk about pricing.
As per this page https://cloud.google.com/kubernetes-engine/pricing#autopilot_mode
I can clearly see general purpose pods are charged at
0.0133 per vCPU per Hour.
0.0014767 per GB memory per Hour.
Based on what GCP says my usage is, I can say, the price would be as follows:
(15 vCPU * 0.0133 + 26 GB Memory * 0.0014767) * 24 * 30 = 171.283824 Per Month
Is this understanding correct? Please let me know.
Now coming to cluster with Performance nodes. I know the way it is charged is,
Compute Engine pricing for the virtual machine, plus an Autopilot premium for the CPU and memory. based on the pricing mentioned here. https://cloud.google.com/spot-vms/pricing
Cluster with performance node will cost as follows:
(0.00984 * 12.05 + 0.001319 * 17.63) * 24 * 30 = 102.1146984
Plus, the premium
(0.0012 * 12.05 + 0.0032 * 17.63) * 24 * 30 = 51.03072
Total cost becomes = 153.1146984 Per month.
Additionally, There will be autopilot charge of 0.10$ per hour and storage cost. But other than this am I missing something ? Is this the correct way to calculate cost ?