Live data from Hacker News

Why is Kubernetes getting so popular?

stackoverflow.blog

81–90 of 681 posts

Re: Why is Kubernetes getting so popular?

#81
post #65

Earlier quoted context omitted.

Ansible is YAML, but it's definitely imperative YAML - each YAML file is a list of steps to execute. It uses YAML kind of like how Lisp uses S-expressions, as a nice data structure for people to write code in, but it's still code. Sure, the steps are things like "if X hasn't been done yet, do it." That means it's idempotent imperative code. It doesn't mean it's declarative. CFEngine is slightly less imperative, but w…

How does K8s know what order to do things in if there aren't steps? Because on a system, certain things obviously need to happen before other things.

You can save your Kubernetes manifests in any order. Stuff that depends on other stuff just won't come up until the other stuff exists.

For example, I can declare a Pod that mounts a Secret. If the Secret does not exist, the Pod won't start -- but once I create the Secret the pod will start without requiring further manual intervention.

What Kubernetes really is, under the hood, is a bunch of controllers that are constantly comparing the desired state of the world with the actual state, and taking action if the actual state does not match.

The configuration model exposed to users is declarative. The eventual consistency model means you don't need to tell it what order things need to be done.

Re: Why is Kubernetes getting so popular?

#82

For me, and many others: infrastructure as code. Kubernetes is very complex and took a long time to learn properly. And there have been fires among the way. I plan to write extensively on my blog about it. But at the end of the day: having my entire application stack as YAML files, fully reproducible [1] is invaluable. Even cron jobs. Note: I don't use micro services, service meshes, or any fancy stuff. Just a plain…

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?

> What else do you need before you hit corporation-scale requirements?

Cronjobs, configmaps, and dynamically allocated persistent volumes have been big ones for our small corporation. Access control also, but I'm less aware of the details here, other than that our ops is happier to hand out credentials with limited access, which was somehow much more difficult with swarm

Swarm has frankly also been buggy. "Dead" but still running containers - sometimes visible to swarm, sometimes only the local Docker daemon - happen every 1-2 months, and it takes forever to figure out what's going on each time.

Re: Why is Kubernetes getting so popular?

#83
in my opinion it kinda sets a common lingo between development people and operations people.

operations details are hidden from developers and development details (the details of the workload) are hidden from the operations engineers.

Re: Why is Kubernetes getting so popular?

#84
post #43

Earlier quoted context omitted.

Having extensively used Chef and K8s, the difference is that they try to deal with chaos in unmanaged way (Puppet is the closest to "managed"), but when dealing with wild chaos you lack many ways of enforcing the order. Plus they don't really do multi-server computation of resources. What k8s brings to the table is a level of standardization. It's the difference between bringing some level of robotics to manual loadi…

> Now I'm thinking of deploying k8s at home, not to learn, but because I know it's easier for me to deploy nextcloud, or an ebook catalog can't you do that just with containers?

But what do you use to manage those containers and surrounding infra (networking, proxies, etc)? I've been down the route of using Puppet for managing Docker containers on existing systems, Ansible, Terraform, Nomad/Consul. But in the end it all is just tying different solutions together to make it work. Kubernetes (in the form of K3s or a other lightweight implementation) just works for me, even in a single server setup. I barely have to worry about the OS layer, I just flash K3s to a disk and only have to talk to the Kubernetes API to apply declarative configurations. Only things I'm sometimes still need the OS layer for is networking, firewall or hardening of the base OS. But that configuration is mostly static anyways and I'm sure I will fine some operators for that to manage then through the Kubernetes API as IaC if I really need to.

Re: Why is Kubernetes getting so popular?

#85

It's not because of the networking stack. I've yet to meet anyone who can easily explain how the CNI, services, ingresses and pod network spaces all work together. Everything is so interlinked and complicated that you need to understand vast swathes of kubernetes before you can attach any sort of complexity to the networking side. I contrast that to it's scheduling and resourcing components which are relatively easy…

Assuming that like us, you spend the last 10 - 12 years deploying IPv6 and currently running servers on IPv6 only networks, the Kubernetes/Docker network stack is just plain broken. It can be done, but you need to start thinking about stuff like BGP. Kubernetes should have been IPv6 only, with optional IPv4 ingress controllers.

You mean you dont like 3+ layers of Nat VIA iptables ?

Re: Why is Kubernetes getting so popular?

#87

Earlier quoted context omitted.

I've only ever used cfengine and Ansible, but they are both declarative. Hell, Ansible uses yaml files too. I would be somewhat surprised to find out Puppet and Chef weren't declarative either. Because setting up a system in an imperative fashion is ripe for trouble. You may as well use bash scripts at that point. I've used Ansible for close to 10 years for hobby projects. And setting up my development environment. G…

Check out nix for actual development environments. Huge fan of that as well. I can buy a new laptop and be back to 100% in a few minutes. Though the amount of time I spent learning how to get there far exceeds any time savings. Ever.

Hm... I just dd my hard disk to the new one and launch gparted to resize.

A few years ago I even bothered to have two EFI loaders: one for amd an one intel, in case I want to change architecture as well.

Re: Why is Kubernetes getting so popular?

#88

For me, and many others: infrastructure as code. Kubernetes is very complex and took a long time to learn properly. And there have been fires among the way. I plan to write extensively on my blog about it. But at the end of the day: having my entire application stack as YAML files, fully reproducible [1] is invaluable. Even cron jobs. Note: I don't use micro services, service meshes, or any fancy stuff. Just a plain…

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?

I use Swarm in production and am learning k8s as fast as possible because of how bad Swarm is:

1. Swarm is dead in the water. No big releases/development afaik recently

2. Swarm for me has been a disaster because after a couple of days some of my nodes slowly start failing (although they’re perfectly normal) and I have to manually remove each node from the swarm, join them, and start everything up again. I think this might be because of some WireGuard incompatibility, but the strange thing is that it works for a week sometimes and other times just a few hours

3. Lack of GPU support

Re: Why is Kubernetes getting so popular?

#89
post #21

I'd say it's down to two things. First is the sheer amount of work they're putting into standardization. They just ripped out some pretty deep internal dependencies to create a new storage interface. They have an actual standards body overseen by the Linux Foundation. So I agree with the blog post there. The second reason is also about standards, but using them more assertively. Docker had way more attention and acti…

> By limiting the Docker features they would use, they leveled the playing field between Docker and other runtimes, making Docker much less exciting.

Isn't the most popular k8s case to deploy Docker images still though?

Re: Why is Kubernetes getting so popular?

#90
post #30

It's not because of the networking stack. I've yet to meet anyone who can easily explain how the CNI, services, ingresses and pod network spaces all work together. Everything is so interlinked and complicated that you need to understand vast swathes of kubernetes before you can attach any sort of complexity to the networking side. I contrast that to it's scheduling and resourcing components which are relatively easy…

For the nginx ingress case: An ingress object creates an nginx/nginx.conf. That nginx server has an IP address which has a round robin IPVS rule. When it gets the request it proxy's to a service ip which then round robins to the 10.0.0.0/8 container IP. Ingress -> service -> pod It is all very confusing but once you look behind the curtain it's straight forward if you know Linux networking and web servers. The cloud…

> It is all very confusing

Is there an easier + simpler alternative?

Post reply on HN