Observability Lab, Part 1: A Kubernetes Lab on AWS for About ₹500 a Month
Nandan Jadhav

In my OpenTelemetry lab, I followed a request across two services and broke things on purpose to see what the traces would show.
I wanted to test this setup on containers. Most modern applications run on Kubernetes, and a lot of the observability work happens on kubernetes like scraping metrics from pods, collecting logs from nodes, and figuring out why a pod keeps restarting.
So I decided to build a Kubernetes lab. This post is the first part of a series where I’ll set up monitoring on it, define SLOs, add logs and traces, and break things on purpose along the way.
I needed a platform to run it.
What I wanted from the lab
I set four simple requirements:
- Cheap: It should cost a few hundred rupees a month, not a few thousand.
- Disposable: If I break it badly, I should be able to rebuild it without worrying.
- Safe: Nothing exposed to the internet, and no surprise bills.
- Mine: It runs in my own AWS account, so I can keep it, extend it and revisit it whenever I want.
I could have run it on my laptop, but I didn’t want my laptop to be a single point of failure for everything I do. Running it on AWS also meant I could stop it when I’m done and start it again from anywhere.
The choices I made
| Choice | What I picked | Why |
|---|---|---|
| Kubernetes | k3s on one EC2 instance | Amazon EKS charges $0.10 per hour per cluster for the control plane, about $73 a month before a single pod runs. k3s is a lightweight Kubernetes that runs on one machine. |
| Instance | t4g.medium (2 vCPU, 4 GB) | Graviton (ARM) instances are cheaper. In Mumbai, a t3.medium costs the same per hour as a t4g.large with twice the memory. |
| Operating system | Ubuntu 24.04 LTS (ARM) | Most Kubernetes guides use Ubuntu, and it comes with the SSM agent installed. |
| Disk | 30 GB gp3 | Enough for k3s, container images and the monitoring stack. |
| Access | AWS Systems Manager Session Manager | No SSH keys and no inbound ports. The security group has no inbound rules at all. |
| CPU credits | Standard, not Unlimited | t4g instances default to Unlimited, which can add charges if the CPU stays busy. Standard caps the cost. |
The plan is to start on a t4g.medium and resize to a t4g.large later, once Prometheus, Grafana, Loki and Tempo are all running. Resizing only means stopping the instance, changing the type and starting it again.
What it costs
These are on-demand prices in the Mumbai region at the time of writing.
| Running 24/7 | Only when I’m using it (around 65 hours a month) | |
|---|---|---|
| Instance (t4g.medium) | ~$16.35 | ~$1.50 |
| Public IPv4 address | ~$3.65 | ~$0.35 |
| 30 GB gp3 disk | ~$2.50–3 | ~$2.50–3 |
| Total before tax | ~$23 | ~$4.50 |
| With 18% GST | ~$27 | ~$5.30 (about ₹450–500) |
Two things surprised me here.
The first was the public IP address. AWS charges $0.005 per hour for every public IPv4 address, which adds up to about $3.65 a month if the instance never stops. I use the automatically assigned public IP, which is released when the instance stops, rather than an Elastic IP, which is charged even while the instance is stopped.
The second was GST. If your AWS account is billed in India, 18% is added to everything, and it’s easy to forget when estimating costs.
The biggest saving, though, is simply stopping the instance when I’m not using it.
Guardrails, so I don’t get a surprise bill
I know myself well enough to know I’ll forget to stop the instance some evening and I did the same on the very next day!.. So I added three guardrails.
1. A nightly auto-stop. An EventBridge Scheduler schedule calls StopInstances every night at 22:30 IST:
cron(30 22 * * ? *) Time zone: Asia/Calcutta
The schedule needs an IAM role that is allowed to stop the instance. I scoped it to ec2:StopInstances on this one instance only. If I forget, the most it costs me is one evening.
2. Budget alerts. An AWS Budget emails me at 50% of the monthly amount, at 100%, and when AWS forecasts that I’ll go over. The forecast alert is the most useful one and it warns well before the money is actually spent.
3. An email every time it stops. An EventBridge rule watches for base01 changing to stopped and sends me an email through Amazon SNS. If the instance was running at 22:30, I get a message a minute later saying it’s been stopped. If it was already off, nothing changes and no email arrives. It’s a small thing, but it means I don’t have to log in to check.
Setting up k3s
With the instance running and reachable through Session Manager, the setup itself was short.
First, I updated the system and gave the machine a proper hostname. k3s uses the hostname as the Kubernetes node name, and I didn’t want ip-172-31-x-x showing up in every dashboard. On EC2, cloud-init can reset the hostname on boot, so I told it not to:
sudo apt update && sudo apt upgrade -y
sudo hostnamectl set-hostname base01
echo "preserve_hostname: true" | sudo tee /etc/cloud/cloud.cfg.d/99-keep-hostname.cfg
Then I installed k3s, pinning the node name:
curl -sfL https://get.k3s.io | INSTALL_K3S_EXEC="--node-name hostname" sh -
About a minute later, the cluster was up:
NAMESPACE NAME READY STATUS RESTARTS
kube-system coredns-7cfb7bc9c7-rtnkk 1/1 Running 0
kube-system helm-install-traefik-crd-lqfqp 0/1 Completed 0
kube-system helm-install-traefik-z5krx 0/1 Completed 2
kube-system local-path-provisioner-77b9867795-cdjvt 1/1 Running 0
kube-system metrics-server-6dc596dfb8-v9cc5 1/1 Running 0
kube-system svclb-traefik-50e25daf-tll4b 2/2 Running 0
kube-system traefik-7c8544f77-zwfml 1/1 Running 0
The two Completed pods are one-off jobs that install Traefik and then finish. The restarts on one of them are normal too and it retries until Traefik’s resource types are registered.
What went wrong
A few things didn’t work the first time. These were the most useful parts of the exercise.
1. The instance type wasn’t available for my AMI.
When I picked t4g.medium, the console said it wasn’t eligible for the image I had chosen. I had selected the x86 version of Ubuntu, and t4g instances run on ARM processors. Ubuntu publishes both, with different AMI IDs. Switching the architecture to “64-bit (Arm)” fixed it.
2. “Create new role” was greyed out in EventBridge Scheduler.
For the auto-stop schedule, the console wouldn’t create the IAM role for me. I created it manually instead. A role that scheduler.amazonaws.com can assume, with an inline policy allowing ec2:StopInstances on my instance.
3. kubectl couldn’t read its config file.
After copying the k3s config to my home folder, kubectl still failed with permission denied on /etc/rancher/k3s/k3s.yaml. The reason was the shell. Session Manager logs you in as ssm-user with a basic sh shell, which never reads ~/.bashrc, so my KUBECONFIG setting was never applied. Switching to the ubuntu user fixed it, and setting the Session Manager shell profile to sudo su - ubuntu means every session now starts there.
None of these were Kubernetes problems. They were the small details around it, which is usually where the time goes.
What I learned
1. Cost is a design decision.
The biggest savings came from choices made before anything was installed: k3s instead of EKS, ARM instead of x86, and an instance that stops when I’m not using it.
2. Guardrails matter more than discipline.
I trust the nightly auto-stop and the budget alert more than I trust myself to remember. The same is true in production: good monitoring doesn’t rely on someone remembering to check.
3. No inbound ports is a realistic goal.
With Session Manager, I don’t need SSH, key pairs or open ports. It took a few extra minutes to set up the IAM role, and it removes a whole category of risk.
4. Small details take the most time.
The Kubernetes install took one command. The AMI architecture, the IAM role and the shell profile took much longer.
A note on how I built this: I used Claude as a pair throughout, to compare costs, draft the setup steps and work through errors. The decisions and the hands-on work were mine.
What’s next for me?
The cluster is ready, but there’s nothing running on it yet.
In the next part, I’ll deploy a small food-ordering app on it, based on the QuickBite example from my SLI, SLO and SLA post, and then break it on purpose to see how Kubernetes reacts.
After that, the series will add Prometheus and Grafana, SLOs and burn-rate alerts, logs and traces, and eventually some failure scenarios for an AI agent to investigate.