Cloud basicsLesson 15 of 17
Where a Cloud Bill Comes From
The monthly bill came in 30% over budget, and nobody knows why. Follow the bill line by line: compute, storage, data transfer, managed services, then into the Kubernetes cluster, where Pod requests quietly decide how many nodes you pay for. AWS names and prices are used as examples. Other clouds bill the same kinds of things.
Monthly bill$13,000 · +30%
Line in focus—
CPU used / requested—
RequestResponse / reportWatchAppears in a later step
What you will learn
- On-demand, commitments and Spot: three ways to pay for the same VM
- Storage and managed services bill while nobody uses them
- Why NAT and cross-AZ data transfer surprise people
- Kubernetes nodes are sized by requests, not by usage
- Splitting cost per team with tags and OpenCost, then the FinOps loop
Cost drivers and their usual waste
| Cost driver | Typical waste | Fix |
|---|---|---|
| Compute (VMs, nodes) | Everything on-demand, oversized instance types | Commit for steady load, Spot for tolerant work, rightsize instance types |
| Kubernetes requests | Requests far above usage, so nodes are full but idle | Set requests from measured usage, enable node consolidation |
| Block storage | Unattached volumes, overprovisioned sizes | Find available volumes and delete or snapshot them |
| Snapshots and backups | Years of snapshots with no retention rule | Retention and lifecycle policies |
| Object storage | Old data kept in the most expensive class | Lifecycle rules to colder classes or deletion |
| NAT gateway | Image pulls and cloud API traffic processed per GB | Private endpoints for cloud services, a pull-through cache or registry in the VPC |
| Cross-AZ traffic | Chatty services spread across zones | Topology-aware routing, keep heavy talkers in one zone |
| Internet egress | Serving large files straight from servers | A CDN in front, compression |
| Managed services | Non-production databases running 24×7 | Schedule stop or scale down after hours, delete leftovers |
| Untagged resources | Spend nobody owns | Required tags enforced at creation |
Try it yourself
# Last month's cost per service (AWS Cost Explorer)
aws ce get-cost-and-usage --time-period Start=2026-10-01,End=2026-11-01 \
--granularity MONTHLY --metrics UnblendedCost \
--group-by Type=DIMENSION,Key=SERVICE
# The same, grouped by an activated cost allocation tag
aws ce get-cost-and-usage --time-period Start=2026-10-01,End=2026-11-01 \
--granularity MONTHLY --metrics UnblendedCost --group-by Type=TAG,Key=team
# Unattached volumes that still bill
aws ec2 describe-volumes --filters Name=status,Values=available \
--query 'Volumes[].[VolumeId,Size,CreateTime]' --output table
# Kubernetes: actual usage vs requests
kubectl top pods -A --sort-by=cpu
kubectl get pods -A -o custom-columns='NS:.metadata.namespace,POD:.metadata.name,CPU_REQ:.spec.containers[*].resources.requests.cpu,MEM_REQ:.spec.containers[*].resources.requests.memory'
kubectl describe nodes | grep -A 8 'Allocated resources' # requested share of each node
Check yourself
Further reading: FinOps Framework · Amazon EC2 pricing · Savings Plans · Spot Instances · VPC pricing (NAT gateway) · Cost allocation tags · OpenCost · Requests and limits · Auto-Scaling VMs (Auto Scaling Groups)