Outcome
By the end of this lesson, you will be able to recognise the bill lines that come from virtual machines, Kubernetes and serverless, and say which meter each one runs on.
| Prerequisites | L1, L2, L3 |
| Time | 7 minutes |
1. Concept
The three ways of running software from this module look very different to an engineer. On a bill, they come down to the same few meters you already know.
Virtual machines
A VM shows up under the provider’s compute service: EC2 on AWS, Compute Engine on Google Cloud, Virtual Machines on Azure.
- The machine itself: per hour.
- Its disk: per GB-month, under a storage or disk line (EBS, Persistent Disk, Managed Disks).
- Any data it sends out: per GB, often under a separate data transfer line.
Kubernetes
This is where bills confuse people. There is often no single line called “Kubernetes” that holds the full cost.
- The cluster fee, if there is one, appears under the managed Kubernetes service (EKS, GKE or AKS).
- The nodes are ordinary virtual machines, so they usually appear under the compute service, next to every other VM. On a bill, a node looks just like any other machine.
- The disks, load balancers and data transfer the cluster uses each appear under their own services.
So the Kubernetes line can look small while the cluster’s real cost is spread across several other lines. To see the whole cost, you add the pieces together. Labels attached to resources, called tags (labels on Google Cloud), are the usual way to find which machines belong to which cluster. I.4 covered why those labels matter.
Serverless
Serverless functions show up under their own service: Lambda, Cloud Run functions (or Cloud Run) or Azure Functions. You will usually see two kinds of line:
- Requests: a count, priced per million.
- Compute time: GB-seconds.
The storage, databases and data transfer the functions use appear under those services, as usual.
The pattern
| How the software runs | Where it shows up | Main meter |
|---|---|---|
| Virtual machine | Compute service | Per hour |
| Kubernetes | Compute service (nodes), plus a cluster fee line | Per hour, for nodes |
| Serverless | Function service | Per request and per GB-second |
Disks, storage and data transfer appear for all three, under their own lines.
2. Worked example
Here is part of an illustrative AWS bill for one month. All prices and amounts are illustrative.
| Bill line | Service | What it is | Cost |
|---|---|---|---|
| EC2 instances, 8 machines | EC2 | 3 web VMs and 5 Kubernetes nodes | $1,168 |
| EKS cluster fee | EKS | Control plane for one cluster | $73 |
| EBS volumes | EC2 (disks) | Disks for all 8 machines | $64 |
| Lambda requests | Lambda | 2 million function calls | $0.40 |
| Lambda compute | Lambda | 400,000 GB-seconds | $8.00 |
| Total | $1,313.40 |
Each machine costs $146 a month ($0.20 x 730 hours), so 8 machines cost $1,168. Of that, 5 are Kubernetes nodes: $730. Add the cluster fee ($73) and those nodes’ share of the disks (5 x $8 = $40), and the cluster really costs $843 a month. The line labelled EKS shows only $73.
3. Hands-on (5 min: no account needed)
1. Open the AWS Pricing Calculator: calculator.aws2. Create an estimate and add Amazon EKS with 1 cluster. Note the monthly cost.3. Add Amazon EC2 with 3 small machines, on 730 hours a month. These are the nodes.4. Look at the estimate summary. Note that the nodes appear under EC2, not under EKS.5. Add the two lines together to get the true monthly cost of the cluster.The summary shows the same split you will see on a real bill.
4. Knowledge check
Q1
On a typical bill, where do the nodes of a managed Kubernetes cluster usually appear?
A. Under the managed Kubernetes service only
B. Under the compute service, with other virtual machines
C. Under the serverless function service, as function calls
D. They do not appear on the bill at all
Show answer
Correct: B. Nodes are ordinary virtual machines, so they usually bill under the compute service. The Kubernetes service line typically holds only the cluster fee.
Q2
Which pair of meters is typical for a serverless function?
A. Per hour and per GB-month
B. Per node and per cluster
C. Per request and per GB-second
D. Per user and per login session
Show answer
Correct: C. Functions are billed for each call and for the memory used multiplied by running time.
Q3
The Kubernetes line on a bill shows an illustrative $73. Why might the cluster really cost much more?
A. Because the provider hides most of the cost until next month
B. Because Kubernetes software needs a separate yearly licence
C. Because the $73 is only a deposit refunded later
D. Because its nodes, disks and data transfer bill on other lines
Show answer
Correct: D. The cluster’s machines, disks and transfer are spread across other services. Add them up, using tags or labels to find them, to see the true cost.
5. Apply
When someone asks “what does our Kubernetes cost?”, do not stop at the Kubernetes line. Ask for the machines, disks and data transfer that belong to the cluster too. The answer is a sum of several lines, and it is usually much larger than the one with Kubernetes in its name.