Cost optimization with kubernetes

Correction 2023-07-02: fix homelab specs and corresponding AWS EC2 instance class (it’s actually 32GB RAM, not 64GB) Congratulations, you managed to successfully deployed a few services on kubernetes! But this is not the end 👀. Unfortunately money doesn’t grow on trees, and if you can’t justify your infra expenses, finance department won’t be happy. If you’re using Terraform, you can use Infracost to create a cost report. Pretty nifty. But what about kubernetes?...

April 1, 2023 · 2 min · Karn Wong

Bare metal works, until it doesn't. Hello, cloud.

Background Ever wonder how websites (and everything in between) work? Chances are you can create a project running on your local machine. It works as you expected, but to let other people access it, you have to “deploy” it. For many years, to support a lot of request volumes you need to run your applications in a data center. These days this setup is known as on-premise. Architecture Let’s take a look at a simple e-commerce website architecture....

March 24, 2023 · 4 min · Karn Wong

SecretOps with teller

Raise your hands if you normally have to send .env files to your team members so they can start a project in dev environment. While there is nothing wrong with this approach, it could introduce a lot of security risks, namely sharing secrets via plaintext protocol. Sure, you can share them on Slack, Discord, etc. But unless it’s encrypted with your own keys, it could be leaked if the said communication platform were to be breached....

March 19, 2023 · 2 min · Karn Wong

Load balancer 101, thou shalt not be alone

Scaling, the dreaded word among developers, because this means more complexity. But why do we need scaling? Imagine a super busy corner store. During early mornings, there might not be a lot of customers, so one cashier might be enough to handle all customers. But during afternoons or evenings, more customers would flock to the store, and our only cashier couldn’t checkout fast enough, and this means losing potential customers....

December 10, 2022 · 2 min · Karn Wong

Cross-platform package (+env) management with Nix

For many years, installing a package on linux means either: Compiling a binary from source, then install it. -> I think we know why this didn’t catch on for the mass. Downloading a compiled binary for your system’s architecture and platform. -> This requires you to also move the executable to something like /usr/local/bin otherwise it won’t be discoverable throughout the system. Using system’s package manager: apt, apk, yum, brew, etc....

December 3, 2022 · 4 min · Karn Wong