Understanding GKE Autopilot pricing

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 vCPU17.63 GB

For general purpose 

15 vCPU26 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 ?
2 1 303
1 REPLY 1

This is napkin math and I am not a billing person @ojasgo 

With Performance class, GKE rounds up to the nearest predefined Compute Engine machine type, which is what Compute Engine bills you for.

Assuming that you use C3, you need to go to the C3 page: https://cloud.google.com/compute/docs/general-purpose-machines#c3-standard and look for the nearest C3 machine type (in this case since your vCPU request is 12.05 vCPU, the nearest machine type is c3-standard-22). Then calculate your cost based on that:

(for us-central1)
Cluster cost (0.00835 x 22 + 0.001119 x 88) * 24 * 30 = 203.16
Premium: (0.0012 x 12.05 + 0.00015 x 17.63) * 24 * 30 = 12.32

Top Labels in this Space
Top Solution Authors