Live data from Hacker News

Why is Kubernetes getting so popular?

stackoverflow.blog

541–550 of 681 posts

Re: Why is Kubernetes getting so popular?

#541

I’ll take a shot. k8s is popular because Docker solved a real problem and Compose didn’t move fast enough to solve orchestration problem. It’s a second order effect; the important thing is Docker’s popularity. Before Docker there were a lot of different solutions for software developers to package up their web applications to run on a server. Docker kind of solved that problem: ops teams could theoretically take anyt…

> Docker solved a real problem > everybody thinks they need k8s and simply cargo cult it for a simple Wordpress blog docker _also_ has this problem though. there are probably 6 people in the world that need to run one program built with gcc 4.7.1 linked against libc 2.18 and another built with clang 7 and libstdc++ at the same time on the same machine. and yes, docker "provides benefits" other than package/binary/lib…

I am a big fan of using namespaces via docker, in particular for development. If I want to test my backend component I can expose a single port and then hook it up to the database, redis, nginx etc. via docker networks. You don't need to worry about port clashes and it's easy to "factory reset".

In production this model is quite a good way to guarantee your internal components aren't directly exposed too.

Re: Why is Kubernetes getting so popular?

#542

The simple answer is that Kubernetes isn't really any of the things it's been described as. What it /is/, though, is an operating system for the Cloud. It's a set of universal abstraction layers that can sit on top of and work with any IaaS provider and allows you to build and deploy applications using infrastructure-as-code concepts through a standardized and approachable API. Most companies who were late on the Clo…

Just running docker-compose on load balanced machines is pretty close to having all k8s features (that would give you an endpoint, scaling, running pods[containers],heartbeats and nodes[vms]). If you run Kubernetes on GCP you will see it's just a wrapper of GCP vms, load balancers, instance groups and disks. EG: GCP k8's autoscaling for the nodes isn't any better than just simple GCP load balancers and instance group…

You can replicate k8s featureset with plenty of other architectures.

But thats not the point.

k8s is the first infrastructure control plane in existence which is widley supported and standardized.

Can you get a managed docker swarm on aws, gcp, azure, do etc.? no.

How many kubernetes offerings do you know? I know at least 6.

Revolution doesn't need to be flashy and noisy.

Re: Why is Kubernetes getting so popular?

#543

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.

You can always simplify your IT and require everyone to use only a small subset of Linux images which were preapproved by your security team. And you can make those to be only deb or rpm based Linux distributions.

The only problem with these Linux based packaging for deployments are Mac users and their dev environment. Linux users are usually fine, but there always had to be some Docker like setup for Mac users.

If we could say that our servers run on Linux and all users run on some Linux (WSL for Windows users) then deployments could have been simple and reproducible rpm based deployments for code and rpm packages containing systemd configuration.

Complete breeze and no need for Docker or K8s.

Re: Why is Kubernetes getting so popular?

#544
post #529
post #468

Earlier quoted context omitted.

I don't agree with the last paragraph. Your C++ example is orthogonal to the deployment aspect because it discusses the application. Kubernetes and the fragile shell scripts are about the deployment of said application. How are you going to deploy your C++ application? Both options are available, and I would wager that in most cases, Kubernetes makes more sense, unless you have strict requirements.

Kubernetes is for orchestrating a distributed system. What I was suggesting is to (1) make a monolith and (2) make it fast, light and high-throughput. The goal of your service is to reliably serve users at scale; this is just another way of doing it, just much more esoteric. A "C++ monolith" allows me to potentially bypass a lot of this deployment stuff because it could serve lots (millions) of users from a single bo…

>Kubernetes is for orchestrating a distributed system.

No it's not. You can use it to run bunch of monoliths too. K8s provides a common API layer that all of your organisation can adhere to. Just like containers are a generic encapsulation of any runable code.

Re: Why is Kubernetes getting so popular?

#545
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…

"The alternative to K8s isn't your personal collection of fragile shell scripts. The real alternative is not doing the whole microservices thing and just deploying a single statically linked, optimized C++ server that can serve 10k requests per second from a toaster--but we're not ready to have that discussion."

You are writing this and i thought yesterday how to extend my current home k8s setup even further.

I would even manage that little c++ tool through k8s.

K8s brings plenty of other things out of the box: - Rolling update - HA - Storage provisioning (which makes backup simpler) - Infrastructure as code (whatever your shellscript is doing)

I think that the overhead k8s requires right now, will become smaller over the years, it will be simpmler to use it, it will become more and more stable.

It is already a really simple and nice control plane.

I like to use a few docker containers with compose. But if i already use docker compose for 2 projects, why not just using k8s instead?

Re: Why is Kubernetes getting so popular?

#546
I can only speak for myself as a relatively late adopter, right around early 2020 this year.

I only consider that late because I've been reading the hype around k8s for many years already.

Became a late adopter of containers just before k8s actually. Now I've migrated most of my setups both privately and professionally to containers. And setup my first k8s clusters both at work and in my homelab.

So my perspective is that containers are first and foremost an amazing way of deploying software because all that complexity I did in ansible to deploy the software has been moved to the container image.

The project itself now, be it Mastodon, Jitsi, Synapse to name a few, package most of their product for me in automatic build pipelines. All I need to do is run and configure it.

And therefore, moving on to k8s, it would stand to reason that some of those services are able to be clustered. Where better to do such clustering than k8s?

That's just an ops perspective. We also have devs where I work and with k8s they're able to deploy anything from routes down to their services using manifests in CD pipelines. What's not to like?

Only reason one might get disenchanted with k8s is if you expect it to be a one-stop solution for your aging .net application. Not saying you can't deploy that in k8s, I'm just using it as an example of something that might not be microservice ready.

Re: Why is Kubernetes getting so popular?

#547
post #470

Earlier quoted context omitted.

What about application upgrades? Are you ok with your application going down for each upgrade? With Kubernetes, it's very simple to configure a deployment so that downtime doesn't happen.

If and only if your application supports it. Database schema upgrades can be tricky for instance, if you care about correctness. On the other hand, atomic upgrades by stopping the old service and then starting the new service on a Linux command line (/Gitlab runner) can be done in 10 seconds (depending on the service of course – dynamic languages/frameworks sometimes are disadvantaged here). I doubt many customers wi…

And that downtime can even be avoided without resorting to k8s. A simple blue-green deployment (supported by DNS or load balancer) is often all that's needed.

K8s only makes sense at near Google-scale, where you have a team dedicated to managing that infrastructure layer (on top of the folks managing the rest of the infrastructure). For almost everyone else, it's damaging to use it and introduces so much risk. Either your team learns k8s inside out (so a big chunk of their work becomes about managing k8s) or they cross their fingers and trust the black box (and when it fails, panic).

The most effective teams I've worked on have been the ones where the software engineers understand each layer of the stack (even if they have specialist areas of focus). That's not possible at FAANG scale, which is why the k8s abstraction makes sense there.

Re: Why is Kubernetes getting so popular?

#548

I’ll take a shot. k8s is popular because Docker solved a real problem and Compose didn’t move fast enough to solve orchestration problem. It’s a second order effect; the important thing is Docker’s popularity. Before Docker there were a lot of different solutions for software developers to package up their web applications to run on a server. Docker kind of solved that problem: ops teams could theoretically take anyt…

> Docker solved a real problem > everybody thinks they need k8s and simply cargo cult it for a simple Wordpress blog docker _also_ has this problem though. there are probably 6 people in the world that need to run one program built with gcc 4.7.1 linked against libc 2.18 and another built with clang 7 and libstdc++ at the same time on the same machine. and yes, docker "provides benefits" other than package/binary/lib…

> docker _also_ has this problem though. there are probably 6 people in the world that need to run one program built with gcc 4.7.1 linked against libc 2.18 and another built with clang 7 and libstdc++ at the same time on the same machine.

You are supposed to keep only a single process inside one docker container. If you want two processes to be tightly coupled then use multi-container pods.

Re: Why is Kubernetes getting so popular?

#549

I’ll take a shot. k8s is popular because Docker solved a real problem and Compose didn’t move fast enough to solve orchestration problem. It’s a second order effect; the important thing is Docker’s popularity. Before Docker there were a lot of different solutions for software developers to package up their web applications to run on a server. Docker kind of solved that problem: ops teams could theoretically take anyt…

Good points but I think it would be accurate to say that Docker solved a developer problem. But developers are only part of the story. Does Kubernetes solve the business' problem? The user's problem? The problems of sys admins, testers, and security people? In my experience it doesn't (though I wouldn't count my experience as definitive).

At my company we have had better success with micro-services on AWS Lambda. It has vastly less overhead than Kubernetes and it has made the tasks of the developers and non-developers easier. "Lock-in" is unavoidable in software. In our risk calculation, being locked into AWS is preferable than being locked into Kubernetes. YMMV.

Re: Why is Kubernetes getting so popular?

#550

I’ll take a shot. k8s is popular because Docker solved a real problem and Compose didn’t move fast enough to solve orchestration problem. It’s a second order effect; the important thing is Docker’s popularity. Before Docker there were a lot of different solutions for software developers to package up their web applications to run on a server. Docker kind of solved that problem: ops teams could theoretically take anyt…

>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…

.rpm and .deb are geared more towards distributions needs. Distributions want to avoid multiplying the number of components for maintenance and security reasons. Bundling dependencies with apps is forbidden in most distribution policies for these reasons, and the tooling (debhelpers, rpm macros) actively discourage it.

It's great for distributions, but not so great for custom developments where dependencies can either be out of date or bleeding edge or a mix of the twos. For these, a bundling approach is often preferable, and docker provides a simple to understand and universal way to achieve that.

That's for the packaging part.

Then you have the 2 other parts: publishing and deployment.

For publishing, Docker was created from the get go with a registry, which makes things relatively easy to use and well integrated. By contrast, for rpm and deb, even if something analog exists (aptly, pulp, artifactory...) it much more some tools created over time which work on top of one another, giving a less smooth experience.

And then, you have the deployment part, and here, with traditional package managers, it difficult to delegate some installs (typically, the custom app develop in-house) to the developers without opening control over the rest of the system. With Kubernetes, developers gained this autonomy of deployment for the pieces of software under their responsability whilst still maintaining separation of concerns.

Docker and Kubernetes enabled cleaner boundaries, more in line with the realities of how things are operated for most mid to large scale services.

Post reply on HN