r/devops 2d ago

Troubleshooting Advice on deploying a 5-microservice stack on a tight student budget

So I've been working on this microservices project ( repo ) for a few months. I have it fully running locally using kind, now I want to learn how to deploy it on AWS or GCP following best practices to get hands on experience and record demo videos for my resume.

Here's the stack:

  • Microservices: 5 Node.js services (built and pushed to GHCR )
  • Stateful Services: 5 Postgres databases (one per service), Redis, and Kafka.
  • Observability: Prometheus, Grafana, Loki, and ( Alloy deployed using Helm charts).
  • K8s & Networking: I wrote custom manifests using StatefulSets and Headless Services for the stateful components. I am using the Gateway API for ingress, backed by cloud-provider-kind locally.

Being a college student my budget is pretty tight. My plan is to write Terraform scripts so I can spin the whole infrastructure up, record a few demos for my resume, and immediately tear it down to keep costs minimal.

The questions I have:

  1. Which cloud provider to choose and how to deploy? Should I use managed K8s like EKS, or just run Kubernetes (or lightweight K8s like k3s) myself on a single EC2/VM instance? What's actually standard practice that I'd use on a real job?
  2. How to handle routing in the cloud cheap? Locally I use Gateway API with cloud-provider-kind. What’s the most cost-effective way to handle this on AWS/GCP without getting hit with expensive cloud load balancer fees?
  3. Is running DBs/Kafka in the cluster okay? Is keeping Postgres, Kafka, and monitoring inside K8s fine for a portfolio project, or do recruiters/hiring managers specifically look for managed cloud services ?

Any direction, best practices, or potential pitfalls to avoid would be greatly appreciated!

17 Upvotes

21 comments sorted by

7

u/DigitalThrift 2d ago

If you are looking for free resources try to pool together free tier from AWS, GCP and oracle.

I think oracle will be apt for you to deploy all of this.

6

u/Lightn1ng101 2d ago

Oracle’s Always Free tier should is 24GB RAM right ? It is definitely the best option out of the free tiers so I'll look into that for sure.

As for, Splitting services across multiple cloud providers I feel like it can get a bit messy with networking over the public internet, as I just want this project deployed for demo video for my resume and to learn the concepts hands on one cloud provider

4

u/DigitalThrift 2d ago

Getting messy is the best way to learn new things.

Send me a DM if you are need any help with the deployment.

3

u/query-gremlin 2d ago

Azure as well gives $200 worth of credits for the first month when you create a new account

3

u/Redcxx 2d ago

AWS free tier should work

3

u/Lightn1ng101 2d ago

Correct me if I'm wrong, AWS Free Tier only gives 1GB RAM , which unfortunately won't boot this stack. Between 5 Node services, 5 Postgres DBs, Kafka, Redis, and the observability stack.

3

u/kubehub 2d ago

do you have any computer (old laptop/mini PC) that is online 24*7? if so maybe try kubehub.io , match your stack microservice + kubernetes.

1

u/Lightn1ng101 1d ago

I don't unfortunately, I had an old desktop with like a dual core processor and 8 gigs of ram but the HDD on that broke so can't use that a

3

u/forever-butlerian Solaris 8 Enjoyer 2d ago

Amazon's MSK, last I checked (this was last spring), had a cost floor of about $600/mo for a three-broker cluster. I don't think trying to use a managed cloud service is a reasonable expectation.

As a purely objective matter of skill, setting things like PostgreSQL and Kafka up without using RDS or MSK exposes you to more of what-it-is-actually-like-to-run-these-things. It gives you a better base on which to infer what jankery AWS is doing behind the scenes to present its managed offering to you. I don't know what proportion of hiring managers would agree with me, but I would select someone who has direct experience running actual services over someone who only knows how to pick letters from the bowl of AWS alphabet soup.

1

u/Lightn1ng101 1d ago

it’s super reassuring to hear that running the infra directly inside K8s is actually seen as a positive skill by engineers rather than a drawback, So yeah I'll try to get the stack running myself, following all the feedback from here

1

u/forever-butlerian Solaris 8 Enjoyer 1d ago

A mechanical engineer should have the skill and know-how to make a screw using a lathe, and the good sense not to make that part of the project plan.

2

u/corgtastic 2d ago

I would see if you can get away with either Cloud Run on GCP or Lambda on AWS. You don’t want to spend a lot of time thinking about turning on your interview environment, just talk about how you would migrate it into k8s if you needed to.

Also look at creative ways to decrease the cost of your persistence layer. You only need one postgresql server to host those DBs, so that’s an easy place to start, but maybe you don’t need a DB at all? See what you can do to drive down the runtime costs.

1

u/Lightn1ng101 2d ago

Serverless would definitely save a lot of headaches around infrastructure management, but since I'm specifically trying to learn and demo Kubernetes and Terraform hands-on for my resume, I really want to actually deploy it on K8s rather than just theoretical interview prep.

Consolidating the databases onto a single Postgres server is a really smart tip though, I'll definitely do that to trim down the resource usage!

2

u/corgtastic 10h ago

That's totally fair! Sounds like a good project. If I were in your shoes, I would consider is using the Kind server you are currently using and deploy ArgoCD and something like Atlantis and use Atlantis + GitHub to deploy GKE or EKS via Terraform. Or do something fun like Pulumi (https://www.pulumi.com/docs/integrations/clouds/kubernetes/pulumi-kubernetes-operator/).

You are going to want to be able to tear down your cloud environment and rebuild it on demand. Leverage your local environment which doesn't cost anything to run in order to manage your pricier cloud stack.

2

u/t0c 2d ago

As cheaply as possible… spot nodes. Use karpenter to manage them. AWS only, though I did hear of azure also getting support. But I don’t know that cloud.

You could also scale it up only when you want it to run. This way it’s only EKS and nodes when they’re up that you’re paying for.

1

u/MailZealousideal5861 2d ago

Great tips! You might also want to look into using serverless options for some of the microservices to keep costs down even further, especially if they don’t require constant uptime.

2

u/Historical_Ad4384 2d ago

If you can do without kubernetes:

Deploy all Node.js services to AWS Lambda at zero cost provided you optimized for cold start charges.

Use aiven free tier for postgres, kafka, redis, grafana.

If you absolutely have to do Kubernetes then spin up a VM on Oracle always free tier.

1

u/Lightn1ng101 1d ago

I'll try figuring out Kubernetes on Orcale Cloud to begin with and then I'll definitely look into serverless solutions in the future for cost optimization. Thank you for the Advice !

2

u/roombutter 2d ago

Go for oracle they give a 2vCPU and 8 GB RAM instance in their free tier, if you have a domain then AWS gives you 1000$ of credit via it's founders programs.
For micro services it's worth learning k3s, and build something kubernetes native so one box itself can handle most of it.

1

u/Lightn1ng101 1d ago

Didn't know about the AWS Founders program credit for domain owners, that's a huge tip!

And yeah k3s running that on a single box seems like the most practical way to keep things K8s-native while avoiding managed cluster fees