Live data from Hacker News

Why is Kubernetes getting so popular?

stackoverflow.blog

471–480 of 681 posts

Re: Why is Kubernetes getting so popular?

#471

Earlier quoted context omitted.

With "Swarm", do you mean Docker Swarm? Why has it "fizzled"? The way I learned it in Bret Fisher's Udemy course, Swarm is very much relevant, and will be supported indefinitely. It seems to be a much simpler version of Kubernetes. It has both composition in YAML files (i.e. all your containers together) and the distribution over nodes. What else do you need before you hit corporation-scale requirements?

A little off topic but why do these orchestration tools always prefer to use YAML as I really feel it a harder to understand format than JSON or better TOML and it's the only thing that I don't like about Ansible. I see ruby kind of uses YAML often but are people comfortable editing YAML files? I always have to look up how to do arrays and such when I edit them once in a while.

> when I edit them once in a while

Anything new needs a certain amount of sustained practice before you get the hang of it. I think I had to learn regex like four times before it stuck. I haven’t hit that point with TOML yet so I avoid it.

I’d suggest using the deeper indentation style where hyphens for arrays are also indented two spaces under the parent element. Like anything use a linter that enforces unambiguous indentation.

I prefer YAML for human-writeable config because JSON is just more typing and more finicky. The auto-typing of numbers and booleans in YAML is a pretty damn sharp edge though and I wish they’d solved that some other way.

Re: Why is Kubernetes getting so popular?

#472
post #394

Main benefits of Kubernetes: • Lets companies brag about having # many production services at any given time • Company saves money by not having to hire Linux sysadmins • Company saves money by not having to pay for managed cloud products if they don't want to • Declarative, version controlled, git-blameable deployments • Treating cloud providers like cattle not pets It's going to eat the world (already has?). I was…

I've never coded in C++, so I'm curious - what is the feedback loop like? My understanding is that since C++ is a compiled language, you can't "hit refresh" the same way you can in JavaScript/Ruby/etc. Is that an incorrect understanding? I know C++ is supposed to be great for performance, but in truth I've never needed anything to be that fast. And if I can get the job done just as well with something I already know,…

It doesn't have to be C++ of course. The main point of OP lies in C++ being fast and easy to deploy (at least it can be). Go, Rust, to some extend C# and Java also fall in that category. This feature set becomes interesting, because it has the potential to simplify everything around it. If you don't need high fault tolerance you can go a very long way with just a single server, maybe sprinkled with some CDN caching in front if your users are international.

If you do need higher availability you can go the route StackOverflow was famous for for quite some time of having a single ReadWrite master server, a backup master to take over and a few of ReadOnly slave servers, IIRC. With such setups you can ignore all the extra complexities cloud deployments bring with them. And just because such simple setups make it possible to treat servers like pets, doesn't mean they have to be irreproducible undocumented messes.

Re: Why is Kubernetes getting so popular?

#473

Earlier quoted context omitted.

Do you have a recommended tutorial for engineer with backend background to setup a simple k8 infra in ec2?

Take a look at https://github.com/kelseyhightower/kubernetes-the-hard-way . That’d be a great first step if the purpose is to learn Kubernetes. If, however, you want to set up a cluster for real use then you will need much more than bare bones Kubernetes (something that solves networking, monitoring, logging, security, backups and more) so consider using a distribution or a managed cloud service instead.

Setting up your own k8s from scratch is kind of like writing your own string class in C++: it’s a good exercise (if it’s valuable for your learning path) but you probably don’t want to use it for actual work.

Maintaining a cluster set up like that is a ton of work. And if you don’t perform an upgrade perfectly, you’ll have downtime. Tools like kops help a lot but you’ll still spend far more time than the $70/month it costs for a managed cluster.

Re: Why is Kubernetes getting so popular?

#474

Earlier quoted context omitted.

I've never coded in C++, so I'm curious - what is the feedback loop like? My understanding is that since C++ is a compiled language, you can't "hit refresh" the same way you can in JavaScript/Ruby/etc. Is that an incorrect understanding? I know C++ is supposed to be great for performance, but in truth I've never needed anything to be that fast. And if I can get the job done just as well with something I already know,…

> I've never needed anything to be that fast In a world where you are billed by ressources used, wouldn’t it be a good idea to have light and fast services that don’t consume those ressources ? I’ve been wondering this for a time now.

The part of the equation you are missing is how little traffic the majority of business applications end up seeing.

A B2B app that has at most 10 concurrent requests can run on the smallest EC2 instance whether it's written in PHP or written in C++.

Bandwidth doesn't change with language choice and neither does the storage requirements of your app so those billable items don't come into the equation either.

So the CPU cost can effectively be dropped off of 95% of the apps out there today. At that point your main variable cost between C++ and something like PHP/Javascript is going to be the cost of development. All I can say to that is that it's a lot harder to find developers who can write C++ web apps at the same pace as developers slinging PHP for web apps. There is a reason Facebook uses a PHP derivative for huge portions of its web backend.

Re: Why is Kubernetes getting so popular?

#475

Earlier quoted context omitted.

I am ready! NetBSD is running on the toaster. I think haproxy can do 10K req/s. tcpserver on the backends. I only write robust shell scripts, short and portable. As a spectator, not a tech worker who uses these popular solutions, I would say there seems to be a great affinity amongst in the tech industry for anything that is (relatively) complex. Either that, or the only solutions people today can come up with are co…

I can see your point for small hobby projects. But enterprise web development in C++ is no fun at all. For example: "Google says that about 70% of all serious security bugs in the Chrome codebase are related to memory management and safety." https://www.zdnet.com/article/chrome-70-of-all-security-bugs... Developer time for fixing these bugs is in most cases more expensive, than to throw more hardware at your software…

True, but the alternative to C++ with that reasoning is Rust or Go (depending on your liking), not Ruby. And with both of these you can step around a lot of deployment issues, because a single server can be sufficient for quite high loads. Avoid distributed systems as much as you can: https://thume.ca/2020/05/17/pipes-kill-productivity/

Re: Why is Kubernetes getting so popular?

#477

Earlier quoted context omitted.

>Before Docker there were a lot of different solutions for software developers to package up their web applications to run on a server. There are basically two relevant package managers. And say what you will about systemd, service units are easy to write. It's weird to me that the tooling for building .deb packages and hosting them in a private Apt repository is so crusty and esoteric. Structurally these things "sho…

Which two package managers do you mean? dpkg, rpm, nix, snap, dnf, and I'm sure someone is going to respond with package managers I forgot.

dpkg and rpm cover the vast majority of production linux servers, which makes them the "two relevant" package managers.

Re: Why is Kubernetes getting so popular?

#478

Earlier quoted context omitted.

I am ready! NetBSD is running on the toaster. I think haproxy can do 10K req/s. tcpserver on the backends. I only write robust shell scripts, short and portable. As a spectator, not a tech worker who uses these popular solutions, I would say there seems to be a great affinity amongst in the tech industry for anything that is (relatively) complex. Either that, or the only solutions people today can come up with are co…

I can see your point for small hobby projects. But enterprise web development in C++ is no fun at all. For example: "Google says that about 70% of all serious security bugs in the Chrome codebase are related to memory management and safety." https://www.zdnet.com/article/chrome-70-of-all-security-bugs... Developer time for fixing these bugs is in most cases more expensive, than to throw more hardware at your software…

Rust and Go could help you there, and their deployment story is as excellent as C/C++: just compile and ship.

However, their learning curve is pretty steep (particularly Rust) and most developers don’t enjoy having to worry about low-level issues, which makes recruitment and retention a problem. Whereas one can be reasonably proficient with Python/Ruby in a week, Java/C# is taught in school, and everyone has to know JS anyway (thanks for nothing, tweenager Eich), so it’s easy to pick up manpower for those.

Re: Why is Kubernetes getting so popular?

#479
post #394

Main benefits of Kubernetes: • Lets companies brag about having # many production services at any given time • Company saves money by not having to hire Linux sysadmins • Company saves money by not having to pay for managed cloud products if they don't want to • Declarative, version controlled, git-blameable deployments • Treating cloud providers like cattle not pets It's going to eat the world (already has?). I was…

Can't agree more. To this add the moving-sand landscape of an ecosystem there.

But then again it's actually the first public/popular attempt on a cloud OS. There might be a next one with better ergonomics than yamls.

Re: Why is Kubernetes getting so popular?

#480

Earlier quoted context omitted.

I am ready! NetBSD is running on the toaster. I think haproxy can do 10K req/s. tcpserver on the backends. I only write robust shell scripts, short and portable. As a spectator, not a tech worker who uses these popular solutions, I would say there seems to be a great affinity amongst in the tech industry for anything that is (relatively) complex. Either that, or the only solutions people today can come up with are co…

I can see your point for small hobby projects. But enterprise web development in C++ is no fun at all. For example: "Google says that about 70% of all serious security bugs in the Chrome codebase are related to memory management and safety." https://www.zdnet.com/article/chrome-70-of-all-security-bugs... Developer time for fixing these bugs is in most cases more expensive, than to throw more hardware at your software…

That's why C++ is in brackets. :) I think the reason a hobbyist might be able to pull off something extraordinary is because he is not bound to the same ambition as a tech company. He can focus on performance, the 10K req/s part, and ignore the "requirement" of serving something large and complex that is likely full of bugs. "Developer time" is "hobby time". Done for the pleasure of it, not the money. Some of the most impressive software from a performance standpoint has been written by more or less "one man teams". I am glad I am not a tech worker. Even for someone who enjoys programming, it does not sound fun at all. No wonder there is so much cynicism.
Post reply on HN