Live data from Hacker News

Do I Need Kubernetes?

mbird.biz

161–170 of 180 posts

Re: Do I Need Kubernetes?

#161
I've sprinkled some comments in this thread, but as someone who is working more or less full time with k8s infrastructure, architecture and maintenance (and I do love k8s!), my take is that if you have to ask this question then the answer is invariably: NO.

Re: Do I Need Kubernetes?

#163

Earlier quoted context omitted.

Reading this, I doubt it can be taken as gospel. > Store config in the environment How do you pass hierarchical config? In JSON, YAML, TOML, etc., it's easy to group env vars, but how do you do that with env vars? LOGGING__HANDLER__FORMAT, LOGGING__HANDLER__ARGS__ARG1, LOGGING__HANDLER__ARGS__ARG2 ? If so, that looks positively awful. If the solution is passing a YAML or JSON string in the env variable, that sounds e…

> How do you pass hierarchical config? In JSON, YAML, TOML, etc., it's easy to group env vars, but how do you do that with env vars? Spring Boot approaches that problem via `SPRING_APPLICATION_JSON` (and likely `SPRING_APPLICATION_YAML` but I haven't personally tried it) containers: - name: web image: whatever env: - name: SPRING_APPLICATION_JSON # language=json value: | {"spring": {"logging": {"level": "debug"}}}

Goodness gracious. That's dreadful and exactly what I feared the effect of that rule would be were it followed strictly. It looks like a hacky workaround to an unnecessary problem.

Re: Do I Need Kubernetes?

#164

Earlier quoted context omitted.

I prefer to take it one abstraction further and setup a makefile where the default `make` brings up the app. This makes it so you can rework the runtime as you see fit and nothing changes. It also doesn't require you to jump into docker immediately, and gives a good extension point for various 'helper script' workflows that you will always have.

Makefiles are nice in theory but don't scale well to team members who don't know how to use make. If your team is full of experienced C/C++ devs then this will probably work great for you. If you are working with a bunch of android/javascript/etc developers who've never seen make, and who haven't exercised the skillset of reading through 3-decade-old email threads to find answers, you'll find that the only thing you'…

> If you are working with a bunch of android/javascript/etc developers who've never seen make, and who haven't exercised the skillset of reading through 3-decade-old email threads to find answers, you'll find that the only thing you'll do is "make" them upset.

Actually I find most answers either in official documentation or on StackExchange sites. And I much prefer digging in mailing lists over digging in GitHub issues. You access both over web anyway.

Re: Do I Need Kubernetes?

#165
post #42

Earlier quoted context omitted.

There are a lot of projects these days that aim to use Kubernetes as a docker-compose environment. I personally use http://skaffold.dev/ with either a local Kubernetes cluster built with https://github.com/rancher/k3d or https://github.com/kubernetes-sigs/kind . I think there's a very easy argument to be made that says that running K8s locally is overkill, but what I will say is that if you run your applications loca…

Neither k3d (k3s) nor kind support building of images since they use containerd directly, which [building] seems to be a requirement for development environment. This means that you need to build your app using Docker, and then import it to k3d/kind environment, thus needing local registry (not enabled by default), which means that images are duplicated.

Have you tried building images from inside a pod via buildah?

Re: Do I Need Kubernetes?

#166
post #68

This sounds like people try to compare K8s with what was before and sure, that all holds true. You get all of this with serverless (be it with managed services or FaaS), with reduced (albeit not zero) complexity compared to K8s.

And with serverless you get significant lock-in, are overpaying for resources, have less ability to debug when things go wrong, have basically zero flexibility and it's very difficult to have a local setup mirror your production one. It's fine for certain use cases but you get the benefits of both worlds by just using a managed K8s service like AWS EKS.

I'll dive into K8s this week, after a few years of serverless. I'm intrigued to see what it has to offer, that serverless lacks.

Re: Do I Need Kubernetes?

#167

Earlier quoted context omitted.

Yeah but if you use bare tools then it’s hard to change them and the interface may differ project to project. If you let the JS developers pick your universal build tool then they’ll want to change it annually because now the old one they loved is “terrible” and some other thing is great and is definitely the way forward. Plus then you’ll need node on every machine that needs to run the build, and probably you’ll wan…

The solution here is to choose a build system that is language agnostic. The most common of these is docker & docker-compose. There's also the Blaze-likes (Pants, Buck, Bazel, Please) that let you hermetically include tools like node inside of the build chain. Make is not a "wrapper" it's a "translucent layer on top of" since it doesn't hide the deps on the underlying tools. When I do `docker build -t ... something`…

Yes, you still have to make sure the underlying commands work because Make doesnt provide anything to isolate the commands. But that is also sort of my point: make is nothing but a generic task runner on top of what you are already doing. Its just about having commands and conventions that dont change depending on the underlying systems.

I agree that blaze is the better option, but all the benefits it provides comes with a greater up-front cost, where its not necessarily possible to drop-in on a project and run with. Also notable is that blaze is inspired by and is a replacement for make. So in a lot of ways, make is a poor mans blaze now.

Re: Do I Need Kubernetes?

#168
post #32

I've always seen the story like this: It all started with Ruby. Ruby's syntactic sugar inspired the "syntactic sugar" of tooling, primarily Bundler and Rspec. Tooling, for what felt like the first time, became a first class citizen. Ruby's tooling made Heroku possible: ie, reproducible builds across; dev, testing, staging and production environments. Heroku's success was based on the primitives of the Twelve-Factor A…

This ignores the reality that kubernetes came from google and was based on existing (long lived) tooling. Docker is "some shell scripts around namespaces and cgroups" (also long lived, existing tooling).

The fact that there is public interest in these things _maybe_ you can attribute in some way to ruby but not the existence of them IMO.

Re: Do I Need Kubernetes?

#169

Earlier quoted context omitted.

What happens when your car's A/C stops working? Most people think, I'll just get a little can of R134a, fill up the system, and it'll be good as new. Somebody said they did that once and it worked just fine, so it should work for you too, right? I mean, it says so right on the can, and there's YouTube videos of it and everything. The trouble is, A/C is a complex system. There are moving pieces with specialized oils t…

I would strongly disagree. Etcd, for what it does, is extremely simple. What is so complex about it? The configuration?

It's a distributed decentralized database using self-signed certs. Just by itself it requires maintenance: upgrading the software, upgrading the host it runs on, rotating keys, networking, access control, key space maintenance, backup, etc. Here are the docs you need to know to run it: https://etcd.io/docs/v3.4.0/op-guide/ And there's another dozen docs not written there that the admin just sort of finds out over time.

But it's part of other systems too, making the overall thing a system of systems. Interactions between systems of systems are complex and cause unexpected behavior. At some point you will run into an error in K8s that you can't resolve that will require you to debug Etcd. And "Bob" help you if the database gets corrupt or overwritten, or incompatible versions of software screw up what's in the database, etc. (My original analogy was inaccurate... Etcd is more like the engine than just A/C, because if it stops working, everything stops working)

Do you know what happens if an Etcd certificate's SAN field does not include domain names but only IP addresses? The client requests HelloInfo with an empty ServerName so it doesn't trigger a TLS reload on handshake, making it more difficult to replace expired certs. That is a single random quirk in a single component of this software which underpins all of Kubernetes. I cannot sit here and explain every single reason why Etcd is complex; it must suffice to say that the software just is complex, and that this reality means that while it may sometimes be simple for some people to operate, it will definitely not always be simple to operate, and there will come a time that the true cost will emerge.

Now, most people don't need to pay for that high cost of complexity. They can use a SaaS/PaaS product like AWS ECS/Fargate or others, where somebody at some other company is dealing with the cost of complexity for you. All you have to do at that point is run some API calls and everything just works. Not only is it easier, it's immensely cheaper, less time-consuming, and more reliable.

...But you might not even need ECS! There's a lot of work just to get a simple PoC up on Fargate with an NLB, ACM cert, RDS instance, security groups, VPCs, cluster, service, task, etc. Compare that to just spinning up a micro instance and running MariaDB and a Python on it, and the latter you can have done in 20 minutes. If you can avoid complexity and still meet your SLOs, do that.

Re: Do I Need Kubernetes?

#170
post #81

Earlier quoted context omitted.

The problem with your approach is that you're firmly locked in to the vendor. And in the case of Fargate, Heroku etc you're paying significantly more than if you had made use of Spot instances or shopped around for a cheaper vendor.

Heroku costs about a nickel an hour per server, yeah? A dollar a day? So I'll worry about that price when I get to at least 10 servers

A nickel an hour sounds fine/miniscule, but when you realize thats 30$/month vs an alternative VPS of $5/month then I think the cost premium is pretty clear.
Post reply on HN