We've built our infrastructure on top of docker-compose on a single node server
We've grown enough so that we need more servers and now k8s seems like a good fit
Uh oh, we need to rewrite everything or not use k8s and reinvent the wheel
Situation B: We've deployed a single node k8s cluster and built our infrastructure on top of it
We've grown enough so that we need more servers
Good, just need to migrate to the new cluster, no need to rewrite anything
> I wish it would go away completelyAin't gonna happen, because Docker Compose is only about running containers, there is no:
- secret management
- network policies
- container scheduling with node affinity etc...
- storage management
- extensibility with other k8s operators (hello cert-manager, kubedb, kubevault, tekton, kubirds, etc...)
- ...
I love how HN hates k8s for no valid reason.Do you always need k8s? Of course not, but it really is getting to the point where all but the most trivial of deployments could benefit from running on k8s. Are there other ways to do it? Sure, but the complexity of using k8s has been sanded down through widespread adoption and really nice tooling.
I see it as all about use-case, staffing, and what kind of instance you are using. Cloud-based? A-lot more freedom in being able to just deploying a cluster and not worry about much, on-prem based? Well dang now you've opened up having to be the one to update those nodes yourself - hope that you are a systems admin as well and have the time to perform said updates.
Situation A - I'd like to introduce you to Docker Swarm.
Secret management - sure K8s can do it, but I'm almost certain your organization as well as mine has accepted a vault of some sort that is not in K8s for end users and services to use. Now you just have to write your applications to use this.
Network policies - while K8s can do this, I don't know if this is the strongest argument to use K8s or just a nice cherry on top. It feels like just a shift in responsibility or adding more granularity from your network security team.
When does the situation call for it (in my opinion)? Your company has embraced the methodology of work with staffing for it and you have more than a handful of apps on more than a handful of nodes.
There's lots of valid reasons to not use K8s. I don't hate it. What I strongly disagree with is its use-by-default (not unlike how software is now Microservices-by-default.)
K8s offers lots of functionality (that most folks don't require) in exchange for operational complexity. If you're Google, Microsoft, or a huge organization that can truly afford a DevOps team, then more power to you. But for most small/medium sized businesses they're simply not getting the ROI for the resources they're putting into it. We don't bat an eyelash at those costs because "that's just how you deploy apps in the cloud" today. Same goes for Microservices. Monoliths aren't perfect, but at some places that blindly pray at the altar of Microservices wind up building distributed monoliths, adding complexity and friction that is simply not worth their cost.
Unpopular opinion: K8s and Microservices have hurt more than helped our industry at companies where scaling is not a huge factor (99% of companies.)
docker-compose is just one folder per service, much more practical.