Live data from Hacker News

Why is Kubernetes getting so popular?

stackoverflow.blog

451–460 of 681 posts

Re: Why is Kubernetes getting so popular?

#451
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,…

The other day (actually years) I did a gamejam in Go, I bound Cmd+R to essentially the following:

    system("go build")
    exec("./main")
Not a literal hot code reload that some advanced stuff get to enjoy, but nice enough to shorten the feedback loop.

Re: Why is Kubernetes getting so popular?

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

So now it's kubernetes + kludgy shell/Python scripts.

Re: Why is Kubernetes getting so popular?

#453

Earlier quoted context omitted.

Helm is becoming its own nightmare, fortunately work is already begun to replace it gracefully

Can you expand on this? We are just starting on Helm so curious to know your thoughts.

Sure, the most asinine thing (borrowing from Rob Pike) is to have a system where invisible characters define the scope and semantics of what you are writing. Now Helm takes this one step further (and I one beyond that before saying no more to myself and discovering https://cuelang.org) and starts using text interpolation with helpers for managing indentation in this invisibly scoped language. I hacked in imports, but was like, ok, making this worse.

So there's this problem and a number of experiments are going on. One camp has the idea of wrapping data / config in more code. These are your Pulumi and Darklang like systems. Then there is another camp that say you should wrap code in data and move away from programming, recursion, and Turing completeness. This seems like the right way to me for a lot of reasons both technical and haman centric.

I've pivoted my company (https://github.com/hofstadter-io/Hof) to be around and powered by Cue. Of the logical camp, it is by far going to be the best and comes from a very successful lineage. I'm blown away by it like when I found Go and k8s.

Re: Why is Kubernetes getting so popular?

#454
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 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 complex ones. The more features and complexity, the more something is constantly changing, the more a new solution gains "traction". If anyone reading has examples that counter this idea, please feel free to share them.

I think if a hobbyist were to "[deploy] a single statically linked, optimized [C++] server that can serve 10k requests per second from a toaster" it would be like a tree falling in the forest. For one because it is too simple, it lacks the complexity that attracts the tech worker crowd, and second, because it is not being used by well-known tech company and not being worked on by large numbers of people, it would not be newsworthy.

Re: Why is Kubernetes getting so popular?

#455
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,…

If you're a ruby user looking for extra performance, try Crystal[1]. Everything you love + types compiled to native binaries. You can set up sentry[2] to autocompile and run every time you save, so the feedback loop is just as tight.

[1]: https://crystal-lang.org/

[2]: https://github.com/samueleaton/sentry

Re: Why is Kubernetes getting so popular?

#456
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,…

Technically you can have some sort of command in your C++ program to make it fork itself, that is restart itself disk, maybe after freeing non-shareable resources like listening sockets. One could even imagine that this command includes self-recompilation by invoking make (or whatever your build system is).

An alternative is to have your program expose its pid somewhere, and your make file could send a signal to that pid when a new version is ready. The advantage is that if your program crashes on startup, you don't have to do something different to restart it.

If your application has to include an "auto-update" feature (like browsers), use that instead - its certainly better to eat your own dog food. Maybe just hack it a little bit so that you can force a check programmatically (e.g. by sending it a signal) and so that it connects to a local updates server.

It is true that C++ is an overly complicated language; if you don't need maximal performance, you have a lot of AoT languages that are a bit slower ( something around 0.5 C ) but more "user-friendly". In particular, if you are into servers and want fast edit-compile-run loops, Go might be a good choice.

Re: Why is Kubernetes getting so popular?

#457

Earlier quoted context omitted.

The problem is when you need to duplicate that server or restore it due to some error, you have no idea what all the changes you made are. Besides, it's additional hassle and a chance for things to go wrong, the way I have it set up now is that production gets a new deployment whenever something gets pushed to master and I don't have to do anything else.

But this is a solved problem since... well, at least since the beginning of internet. I managed 1000s of Linux & BSD systems over the past 25 years and I have scripts that do all that since the mid 90s that automate everything. I never install anything manual; if I have to do something new, I first write + test a script to do that remotely. Also, all this 'containerization' is not new; I have been using debootstrap/c…

That's great but then you're not doing what the commenter above said and "logging in to a server and tinkering with it"

Re: Why is Kubernetes getting so popular?

#458

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…

When you are coming from old sysadmin world and you mastered unix systems architecture and software - what k8s does is very straightforward because its the same you already know.

K8S is extremely complicated for huge swarm of webdevs and java developers that really reqlly dont understand how the stuff they use/code really works.

K8S was supposed to decrease the need for real sysadmins but in my view it actually increased the demand because of all the obscure issues one can face in production if they dont really understand what they are doing with K8S and how it works under the hoods.

Which I find hilarious.

Re: Why is Kubernetes getting so popular?

#459
post #225

Earlier quoted context omitted.

Curious why run it at all? The cost must be 10 times more this way. It is mostly for the fun of learning. I come from the opposite approach. I have 4 servers two digital ocean $5 and two vulr $2.50 instances. One holds the db. One server as the frontend/code. One server to do heavy work and another to server a heavy site and holds backups. For $15 I'm hosting hundreds of sites, running so many background processes. I…

How do you do automated deployments, though? I don't like using K8s for small stuff, but I am also extremely allergic to having to log on to a server to do anything. Dokku hits the sweet spot for me, but at work I would probably use Nomad instead.

Set your pod to pull image always and have entrypoint shell script that clones the repo, kill the pod so on restart you could get your code deployed.

You could run init container with Kaniko that pushes image to repo and then main container that pulls that back but for that you need to do kubectl rollout restart deploy

If you are looking for pure CI/CD gitlab has awesome support or you could do Tekton or Argo. They can run on the same cluster.

Re: Why is Kubernetes getting so popular?

#460
post #457

Earlier quoted context omitted.

But this is a solved problem since... well, at least since the beginning of internet. I managed 1000s of Linux & BSD systems over the past 25 years and I have scripts that do all that since the mid 90s that automate everything. I never install anything manual; if I have to do something new, I first write + test a script to do that remotely. Also, all this 'containerization' is not new; I have been using debootstrap/c…

That's great but then you're not doing what the commenter above said and "logging in to a server and tinkering with it"

True; I learned many years ago that that is not a good plan. Although, I too, love it. But I use my X220 and Openpandora at home to satisfy that need. Those setups I could not reproduce if you paid me.
Post reply on HN