I’ve seen many blog posts talking about deploying elixir apps with Kubernets and K8s. I would like to know why I would need it? When would it be the best approach for my projects. What are the benefits to use it instead of deploying normally to a normal single server ?
Currently we have two simple projects and more projects coming up. One of the our members wants to use Kubernets to deploy all projects. They are simple and don’t have a microservice structure.
What do you guys think this approach?
If they’re spawning a new cluster for each project then they’re going to have a bad time. If they want a single cluster within which to do their various projects then it may make sense. If the services don’t really interact though I’m not sure it’s wortth it.
K8s os great when you have a substantial number of applications to run, be them Elixir or not, it facilitates a lot for monitoring, infrastructure recovery and discovery. But it adds more complexity, and that is the big deal, when you have a lot to deploy and do devops around, manually or scripting become unreliable, because people will mess up and K8s can help.
But if you have one or two apps, or even one app per person to manage then K8s it’s just hype and waste of time and resources, aka overengineering. I would focus on the projects coming, when they start to be unmanageable then migrate to K8s.
In my experience, one of the main benefits of something like k8s is that you can take better advantage of all of your compute. There’s an inflection point for a lot of companies where its more cost effective to pay for very large nodes and jam a large number of containers in them then it is to pay for individual instances per service. This shift ideally allows your operations folks to spend more time orchestrating at a higher level of abstraction which is nice if you’ve got a couple hundred nodes or more to deal with.
K8s is by no means a turn-key solution; you need a dedicated set of people to keep your etcd cluster running correctly and manage the other services required to run k8s (or you need to pay a provider to do this for you). Kubernetes is a very interesting and powerful piece of technology and everyone’s tastes are going to be different. If it was me and I had a small number of nodes to work with I’d rather lean on some combination of terraform, packer, and ansible scripts to spin up individual nodes. But like I said everyone’s expertise is going to be different and only you can decide what’s right for your business.
Check out this talk From Daniel Azuma: https://youtu.be/nLApFANtkHs
He explains when to use Kubernetes cons and pro
Hope this helps
In our case we have a large system made up of a bunch of small applications, many in Node. We replicate that system at multiple locations across the globe. Kubernetes allows us to stand up those replicates in a consistent way. We do have people dedicated to grooming Kubernetes itself, as well as the installation system. The use of containers and Helm charts simplified deployment a good bit.
In the Elixir talk podcast ep. 135 they are discussing migrating off of k8s. The main reason was complexity, either when debugging an http request’s hops, deploying or troubleshooting in general. The other reason was perfomance (which arguably could just be down to a bad setup, but that again would be another point for complexity). I’ve never tried k8s personally, so I can’t really share my own experience with it
Thank you all very much. It was very useful.