| > I remain of the unpopular opinion that k8s is really only suitable for companies which are the size of google (imho) This is simply not true if you use managed K8s (DigitalOcean, Google GKE, Amazon EKS, Microsoft AKS, ...). Kubernetes provide a unified API to handle almost every aspect of your containerized application (networking, load balancing, rollout deployments, storage management, service discovery, ...). You might not need many of those, but you won't have to learn another tool to set it up once you do need it. Buy a cheap managed k8s with a single node, helm install nginx ingress controller and cert manager (with letsencrypt). Make your app read config from an environment variable, put it in a Docker image, push it to either ghcr.io or a gitlab container registry. Write a Deployment, a Service and a ConfigMap, eventually an Ingress resource and voila. Your app is up and running in no time. Repeat the last 3 steps for all your apps. It's that simple. You can then work from there if needed: - setup a terraform to automatically setup your managed k8s and managed databases (if you need it)
- setup a CI/CD pipeline to build/push your docker images (github actions, gitlab CI, jenkins, whatever)
- add Prometheus monitoring and a /metrics endpoint in your app to scrap it
- add HorizontalPodAutoscaling
- store secrets in a Vault and inject them in your pods with k8s based auth to the vault using the pod's service account
- add more nodes to your cluster
- ...
None of those steps are required to start doing things, and all can be added without changes to your apps.Yes, for small needs systemd+docker on an EC2 instance can get you far enough. But you'll need to rewrite everything when you need to scale. With Kubernetes, you won't need to rewrite anything. If you want to self host and operate a k8s yourself, that's a complete other story, and I agree with you that you should not do that if you don't specifically need it. |
There's an actual overhead of maintaining that infrastructure and if you're a small company with limited devs it's worth really evaluating if this cost is worth it.