6 ms·
if you can run everything on a $10 vm...do you really need k8 ?
by rawoke083600 6y ago
if you can run everything on a $10 vm...do you really need k8 ?
- takeda 6y agoYou do if you do a resume driven development.
- OOPMan 6y agoOoooh, that one's going to sting in the morning
- deleted 6y ago[deleted]
- merb 6y agomost people probably want the following: - no downtime deployments - distributed jobs - as managed infra as possible without k8s some things would be hard.
- Juliate 6y agono downtime deployments? happened before k8s; used to do that several times with some haproxy. distributed jobs? same; nothing prevents from spawning runners with adhoc libraries and queues. managed infra? not specific to k8s
- manigandham 6y agoThe "adhoc" part is the problem. K8S is standardized and offers high-availability, failover, logging, monitoring, load balancing, networking, service discovery, deployments, stateful services, storage volumes, batch jobs, etc. And it can run self-contained on a single machine or scale out to 1000 nodes. Why piece all of that functionality together yourself into some fragile framework instead of using a industry standard?
- bschwindHN 6y agoIt can be worth it to piece things together yourself. A complex tool can also be fragile if you don't take the time to learn and understand every facet of it. If you only need certain parts of what k8s offers, building those parts yourself can offer you more stability, control, and insight into what your application is doing. As with anything else it varies case-by-case.
- p_l 6y agoBuilding it yourself is also a case of "resume-driven development". Not that there aren't good reasons or good outcomes from having done a deep dive, but just putting it there.
- bschwindHN 6y agoI think using something like k8s prematurely is more an example of "resume driven development" than the other way around. Building it yourself doesn't mean building all of it. For example, it's quite easy to get zero downtime deployments with a tiny bit of systemd configuration and the SO_REUSEPORT socket option. That seems easier for a team to understand than "here is kubernetes and everything that comes with it"
- p_l 6y agoThat is, however, a very tiny slice of what might be needed. You need to deliver the application to the machines somehow. You might need to configure the network to reach the application, etc. All quite common tasks. (And honestly, systemd can bite you just as much if not worse than k8s definitions, because the API is much less cohesive and the defaults like to cut off your hands)
- ownagefool 6y agoBuilding one yourself is a good exercise for understanding something, I agree. The problem with that logic is everyone on your team will need to do it, so you're going to be stuck picking a standard. Should it be yours, should it be mine, or should we both just learn something with a large community behind it? Nothing is perfect of course, but k8s makes a really good target for CI/CD, which is something you want when you're developing as part of a team. If you're not quite a team yet and you don't know how to bootstrap k8s and CI/CD, then you need to figure out when those types of things are important. Probably lots of people could stick with a monolith and a VM for longer than they did, but automated testing will save you a fair bit of time if you're not figuring out how to do it at the same time.
- p_l 6y agoHaving done it myself in the past? Setting up and taking care of k3s is much easier.
- merb 6y agoyeah, we started out with ansible aswell. but some stuff is just way harder. especially no downtime. haproxy is fragile and sending files via haproxy over ssh aswell. docker is also a standarized package+repository format. before we used some kind of hacky cdn solution, etc. it was stuff glued together, written by myself and I was the only guy who understood it and ever will be.
- cdelsolar 6y ago"some haproxy" - what is the haproxy configuration? I tried doing this myself and then realized setting up a cheap k8s cluster on DO was way easier. Now, yes, there have been occasional problems, but not since I just let DO handle the whole thing. I can do zero-downtime deploys, cronjobs (why is spawning a pod so wasteful? it spawns it, runs the job, and then kills it?), all with a single "kubectl apply" command that takes a split second to run.
- bobbyi_settv 6y agoIf you're in AWS, you can use their ELB (Elastic Load Balancer) service instead of setting up your own haproxy. I worked on a team that used it for years without any issues orchestrating zero-downtime deployments. It was extremely easy and didn't require any real configuration.
- serverQuestion 6y agoif a $10 vps would work, but you want no downtime deployments heroku would work perfectly
- zerubeus 6y agoI use dokku since the distributed job is not a feature i’m looking for
- azernik 6y agoSure, you can go without it. But you'll need to write a lot of annoying scripts manually.
- donedealomg 6y agoNo, but that's also why he doesn't have any problems.
- cameronh90 6y agoI use k3s to manage my Plex/NAS/home server machine. Just simply as a deployment tool, it's much easier for me than managing a collection of services deployed by Ansible/Puppet held together by custom scripts and systemd units.
- dvcrn 6y agoThe point is to keep cost down while a project is in development, then scale depending on needs without having to worry about container distribution and resource utilization. On dev I don't need a 10 node cluster if I had 10 containers running. One $10 vm is fine. On prod I can start with a 3-node cluster for these 10 containers, then scale it up depending on traffic and needs while controlling my spending. Not everyone has thousands of dollars of VC money to throw at hosting