Live data from Hacker News

Kubernetes for personal projects? No thanks

carlosrdrz.es

191–200 of 278 posts

Re: Kubernetes for personal projects? No thanks

#191
post #49

Earlier quoted context omitted.

> using it for anything less than dozens of machines is overkill The question isn't really whether you need dozens of machines, it's whether you can foresee eventually maybe needing dozens of machines. Remember the bad old days when people said that relational databases were worthless because they "don't scale", that using Mongo and other NoSQL databases were practically a necessity for doing anything modern and "web…

You don't really need to jump into Kubernetes to be prepared to eventually migrate to it. As long as you're using some kind of compatible containerization platform it is not incredibly hard to shift those workloads to Kubernetes. If you're really only needing to run a small handful of containers, running them directly in Docker or rkt isn't challenging and has very little operational overhead compared to running a fu…

This echoes my thoughts as well. You can get pretty far with just a simple Docker-Compose file for many personal projects, and still leave the door open to a relatively easy transition to more advanced orchestration tooling should the project grow large enough to require it.

Personally I really like Docker Compose files - virtually no overhead to maintain alongside a handful of Dockerfiles coupled with really simple syntax for expressing the relationships between them. Containers themselves seems conceptually challenging for some newcomers in my experience (concepts like image immutability etc don't have many similar analogues I'd argue if you are new to containers, and I've seen some very experienced developers get stuck trying to map them conceptually to VM images which is not a good fit), but the payoff in the ease of deploying your work is huge. It's nothing a reasonable developer can't learn in a few hours though, and the documentation is pretty good.

I especially find Docker great for projects I worked on years ago - I no longer really need to keep track of how to install/configure the side project I haven't touched in age's software dependencies, just hit 'docker-compose up' and I'm running.

I also really like Docker-Compose as a replacement for things like Vagrant scripts to create developer environments in some scenarios - way less overhead than a vagrant script spinning up multiple VMs on your laptop, and generally much faster deployments.

Re: Kubernetes for personal projects? No thanks

#192

Earlier quoted context omitted.

I am asking how one would safely upgrade the service that nginx is proxying to, not how to restart nginx.

You could do "blue-green" deployments with port numbers... service rev A is on port 1001, service rev B is on port 1002... deploy new rev... change nginx config to point to 1002... roll back, you repoint to 1001...

So I need to write some code to keep track of which of A or B is running, then something else to template out a nginx configuration to switch between the two. Then I need to figure out how to upgrade the inactive one, test it, flip the port over in nginx, and flip it back if it breaks.

Or

kubectl apply -f app.yaml

Which is less complex?

Re: Kubernetes for personal projects? No thanks

#193
post #166
post #162

Earlier quoted context omitted.

I don't know how to design an IC either...

You do if you're programming in assembly. Developers need to understand how the layer underneath their code works. If you're writing Java, you should understand the JVM. If you're writing C, you should understand the compiler.

One layer, maybe, but should you be able to deploy any type of web server on every OS if you're writing a web app? I'm not so sure.

Re: Kubernetes for personal projects? No thanks

#194

Earlier quoted context omitted.

> But maybe I envision my side project turning into full-time startup some day. The state of the art for cluster management will probably something completely different by then. Better to build a good product now and if you really want to turn it into a startup, productionize it then. > Maybe I see all the news about Kubernetes and think it would be cool to be more familiar with it. If learning Kubernetes _is_ your s…

> taking more time away from actually building your side project and putting it into building infrastructure around your side project. I generally dislike this way of thinking. Infrastructure is a core component of whatever it is you're building, not an afterthought. Maybe you can defer things until a little bit later, but if you can build with infrastructure in mind you'll be saving yourself so many headaches down t…

Ideally, it shouldn't be too hard to build a side project in such a way that these sorts of infrastructure things are not only a decision that you can defer indefinitely, but also one that you can change later, if you figure out a better way to do it on down the line.

I don't really want to get into a debate over the relative merits of k8s or any other way of doing things in production, but I do want to throw out a general observation: The technologies we use always solve problems that we have. This cuts two ways: If you have a problem, you'll find a technology to solve it. On the other hand, if you have a technology, then soon enough you'll find a problem that it can solve -- even if you have to create the problem for yourself first.

Re: Kubernetes for personal projects? No thanks

#195
post #21

Oh man, the original article went way over the author's head. The point of the original article was that even though Kubernetes is primarily useful for tackling the challenges involved with running many workloads at enterprise scale, it can also be used to run small hobbyist workloads at a price point acceptable for hobbyist projects. Does that mean that Kubernetes should now be used for all hobbyist projects? No. If…

> But maybe I envision my side project turning into full-time startup some day. Maybe I see all the news about Kubernetes and think it would be cool to be more familiar with it. Nah, probably too expensive. Oh wait, I can get something running for $5? Hey, that's pretty neat!

He says it's fine to do it if you want to learn the technology, but points out (rightly, I think) that if your concern is that you might need it at some point down the road, worry about it at some point down the road and not when you're trying to get started.

Re: Kubernetes for personal projects? No thanks

#196

Earlier quoted context omitted.

Personally, as somebody who is building a small Kubernetes cluster right now at home just for the fun of it: I think using Kubernetes for small projects is mostly a bad idea. So I appreciate the author warning people so they don't get misled by all the (justified) buzz around it. For your average developer who just wants to get something running on a port, Kubernetes introduces two barriers: containerization and Kube…

> These are non-trivial things to learn Right, but again I think the point being made is that, if those are skills you do want to learn, or plan on using later down the road, it's worth knowing that you can use K8s even at a small scale. Obviously, in most cases it could be premature optimization, but for some people (including you), it can be fun to learn.

OK, but this is a point made in the article the comment attempts to refute!

Re: Kubernetes for personal projects? No thanks

#197
I agree that Kubernetes for personal projects is likely going to be totally overkill for many, but I disagree that containers themselves are overkill, which this author also suggests. These are arguably two separate issues entirely, and lumping them together is extremely misleading. I happily run all my (very small) side projects in containers without Kubernetes and it's really pretty simple to do so.

As soon as this author mentioned he was happy with using Ansible, Systemd etc instead (which are all reasonable tools for what they are) he lost me - this is collectively much more work for me as the sole developer than a simple Docker container setup for virtually all web app projects in my experience. If you understand these relatively complex tools, you can likely learn Docker well enough in about an hour or two, the payoff in time savings in the future will make this time well spent.

In my experience "Dockerising" a web app is much, much less time consuming than trying to script it in Ansible (or Chef, Puppet, ) and of course much less error prone too. I've yet to meet an Ansible setup that didn't become brittle or require maintenance eventually. If you are using straight forward technologies (Ruby, Java, Node, Whatever) your Dockerfile is often just a handful of lines at most. You can even configure it as a "service" without having to bother with Systemd service definitions and the like at all.

Re: Kubernetes for personal projects? No thanks

#198

So basically, ignore 1/2 of the reasonable problems that are solved in the first article and then look, no need to learn anything!!! As someone whom can setup and run a kubernetes cluster in my sleep, I can tell you that it is a superb production ready platform that solves many real world problems. That in mind, kubernetes has constraints also, like running networked elixer containers is possible, but not ideal from…

> So basically, ignore 1/2 of the reasonable problems that are solved in the first article and then look, no need to learn anything!!!

I think the point is... do you actually have those problems? A lot of people jump immediately to worrying about having thousands of requests per second when it doesn't make any sense.

Re: Kubernetes for personal projects? No thanks

#199

Earlier quoted context omitted.

You could do "blue-green" deployments with port numbers... service rev A is on port 1001, service rev B is on port 1002... deploy new rev... change nginx config to point to 1002... roll back, you repoint to 1001...

So I need to write some code to keep track of which of A or B is running, then something else to template out a nginx configuration to switch between the two. Then I need to figure out how to upgrade the inactive one, test it, flip the port over in nginx, and flip it back if it breaks. Or kubectl apply -f app.yaml Which is less complex?

Depends on what's inside app.yaml, no?

At minimum it requires good-enough health checks so that k8s can detect if the new config doesn't work, and automatically rollback, otherwise you're looking at "no downtime except when there's a mistake" situation.

...and to really check that the health check and everything else in your .yaml file actually works, you will probably have to spin up another instance just so that you can verify your config, unless you like debugging broken configs on live. Well, of course you can always fix your mistake and go "kubectl reaplce -f", but that kinda goes against the requirement of "no downtime".

I grant that k8s makes it easier to spin up a new instance for testing.

Re: Kubernetes for personal projects? No thanks

#200
post #58

I work as an engine mechanic full time, and im learning programming as a hobby. Kubernetes to me is like the shade-tree mechanic vs the professional. Professional mechanics use high grade tools that can cost thousands of dollars each. We have laser alignment rigs, plasma cutters, computer controlled balancing and timing hardware, and high performance benchmarking hardware that can cost as much as the car you're worki…

There are a lot of fully professional, large-scale shops not using Kubernetes, so the analogy seems unfortunate, to me. But I guess that shows you how successful the marketing for this stuff has been, if you think that anyone not using it is acting like a "shade tree mechanic."
Post reply on HN