I have recently started my Kubernetes system in Google Cloud. they offered this free $300 worth of free credits for newbies which is nice. So I spun up 2 VMs for my cluster and ran 2 replicas of redis pod with 1Gig persistent storage, 2 replicas of mongodb with 3gig persistent storage, and a nodejs app container utilizing them. I had my DNS and and used Google's ingress to manage the loadbalancer and static IP. Now when I looked at my billing, I was hoping for something like $30 a month but am surprised to see there are more charges that are activated when your run things like ingress (network and loadbalancer) and service load balancer (which I activate when I access my MongoDB directly from an ephemeral IP address
Here is the daily rate I have now in my Singapore stack billing
FEATURE | DAILY_COST | MONTHLY_COST |
Persistent Disk (Singapore) | $0.05 | $1.50 |
2x N1 Standard predefined instance (RAM) | $0.95 | $28.50 |
2x N1 Standard predefined instance (CORE) | $1.90 | $57.00 |
Managed Zones | $0.01 | $0.30 |
HTTP Load Balancing: Global Forwarding | $0.60 | $18.00 |
Network Load Balancing | $0.67 | $20.10 |
-----------------------------------------------------------------------
TOTAL | $4.18 | $125.40 |
-----------------------------------------------------------------------
(NOTE: Static IP is free of course if I assign them and costs $0.26 a day if I just let it float.)
I was kinda shocked that this setup costs $125 a month already and for a hobby or small app that is quite a lot. That $300 might not last 3 months even. I am also shocked that the declared pricing and actual cost Google stated does not match. In their compute cloud pricing page here it stated that a single core 3.75 G will cost $29.94 per instance a month. but in the billing, you can clearly see these costs are split and their total is almost 2 times of that at roughly $85.5 a month for 2 instances (or $42.75 each). This is kinda a red flag to be honest when pricings and actual bills do not match...
So I am hoping if you guys have some recommendation and have experiences running on competitors like Digital ocean, AWS or Azure if the same setup would be more cost effective there. I heard DO starts at 5$ but when I saw it is almost similar in spec to google's f1-micro which when I used, would spawn me like 5-7 nodes just to manage where some services keep failing due to out of ram issues. I added a g1-small then and it allowed me to have 2 instances of g1 with 5 f1.
Why this big? well besides the normal pods I have, in order for me to manage some functionalities in the Google Cloud, I need to have Google Connector deployed to my cluster. Yes this is weird where Google requires you to deploy something and host it and pay for it so you can manage your kubernetes cluster like handling secrets and so on... that along created the following services in my cluster
cnrm-controller-manager Stateful Set 1/1
cnrm-deletiondefender Stateful Set 1/1
cnrm-resource-stats-recorder Deployment 1/1
cnrm-webhook-manager Deployment 1/1