There are two fields in k8s, requests, and limits. I want to know that whether GKE cost us on requests or limits.
If request is 1Gi and limits is 2Gi Will I be costed for 1Gi or 2Gi?
There are two different modes of operation in Google Kubernetes Engine: Autopilot (easier to manage, but less flexible) and Standard. They're billed differently .
In Standard mode, you're essentially billed for Compute Engine instances used in your cluster. That means your requests and limits are only used indirectly, as you're expected to be responsible for setting up your cluster so that it's scaled according to those. When doing this, you should remember that some of each node's resources are required to run the GKE and Kubernetes node components necessary to make that node function as part of your cluster.
In Autopilot mode, you're billed for resources - CPU, memory, ephemeral storage - requested by your currently scheduled Pods. The catch is that each Pod in Autopilot mode is considered to be a Guaranteed QoS Class Pod :
Autopilot automatically sets resource limits equal to requests if you do not have resource limits specified. If you do specify resource limits, your limits will be overridden and set to be equal to the requests.
To be more specific, in your example 2 Gi limit will be overridden and set to 1 Gi, the same as request. You'll be billed accordingly.
If request is 1Gi and limits is 2Gi Will I be costed for 1Gi or 2Gi?
Yes, If you are on GKE autopilot and plus there will be additional fees ( $0.10/hour for each cluster).
If GKE standard mode
If you are on GKE and using the cluster you will get a charge based on the (If request is 1Gi and limits is 2Gi Will I be costed for 1Gi or 2Gi? won't affect anything)
If Autopilot
If you check the GKE pricing document it's pretty easy and straight forward explaining everything: https://cloud.google.com/kubernetes-engine/pricing#google-kubernetes-engine-pricing
You can use the GCP Pricing calculator to count estimate the cost: https://cloud.google.com/products/calculator
Update :
If you have opened the Calculator, you might have noticed two different GKE modes. You can use that to estimate the cost.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.