by maccard · 2y ago · 0 comments
The problem is that containers are excellent, and IMO there's a gap in the market between "I want to run one container" and "I want a fully managed k8s cluster"
I set this up with Terraform and some bash scripts. Infra as code is just too convenient to pass up on for something that I might not come back to for months at a time (and then ask - how did I set that up?), and containers too mean that I can play with some shiny fun technology one time, leave it in a box, and then come back to a clean-slate for the next thing that I want to play with without having to pay for a new VM etc.
A single container: Docker
A few containers on the same node: Docker Compose
Containers across multiple nodes with load balancing and networking: Docker Swarm (with Portainer to manage it)
Alternatively, Podman is also pretty nice.
If you need something that runs not just containers in clusters: Hashicorp Nomad
If you want to go for Kubernetes but without it being too hard: K0s or K3s or MicroK8s or RKE (with Portainer or Rancher to manage it)
I don't think I ever got around to making it self healing if a container dies, but it does support gitops style deployments through a cronjob / conf repo similar to argocd
It's been running happily on a <$10 / month aws lightsail instance for a few years now, though tbh I'd still reach for k8s for anything serious
When it comes to health checks you have docker health checks, container health checks, load balancer health checks - all of which are configured separately.a Not to mention, doing it "properly" where your task doesn't have a public IP and is only accessible through your load balancer - [0] might be one of the most infuriating responses on stackoverflow.
Meanwhile, with DO droplets, it's pretty much "here's a registry URL, and some configuration in YAML, go for it".
[0] - https://stackoverflow.com/questions/61265108/aws-ecs-fargate...