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.
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:
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