Live data from Hacker News

Do I Need Kubernetes?

mbird.biz

141–150 of 180 posts

Re: Do I Need Kubernetes?

#141
post #6

> Run your applications in Docker from day 1 (with docker-compose it’s as valuable for dev as it is for production) and think carefully before letting your applications store local state. I think this is the key take away for many startups. Get it so you: 1. Have a single-command way to bring up your entire backend 2. That command can run on your dev machine 3. You document all of the settings for your containers and…

> people were amazed by the productivity gains Yeah, docker compose is great for running distributed apps locally when everything “just works”. The problem is that it also impedes development when the compose setup isn’t fully optimized. I work on dockerized rails apps, and whenever a new dependency is added, it can take 15 minutes to rebuild the image, which completely breaks my flow. Docker also creates a ton of da…

At work we use docker-compose for legacy Rails (3!) development (we deploy on AWS ECS using Cloudformation templates).

I wasn’t involved in the setup but adding a new gem or upgrading one is very quick. We use a mounted volume to hold the gems as seen here: https://github.com/concord-consortium/rigse/blob/master/rail...

Re: Do I Need Kubernetes?

#142

Here's a quick reference: 1) Are you on AWS? Then you don't need Kubernetes. Use Fargate. 2) Are you on Google Cloud? Then you don't need Kubernetes. Use Cloud Run. 3) Are you on Azure? Then you don't need Kubernetes. Use Azure Container Instances. 4) Are you on a PaaS like Heroku? Then you don't need Kubernetes. 5) Are you on a random VPC provider / bare metal machines? You could probably still do without Kubernetes…

> do you have about a million dollars to spend on building and maintaining it all? Then you need Kubernetes. I think you're overstating the investment necessary to overcome the initial complication of Kubernetes and also understating the benefit of being on a platform with a massive and thriving community behind it. As an example, in a prior role, there were a set of data engineers that would receive data in the form…

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 that oxidize and break down over time. There's a sealed system of pressurized gas. There's a pump, clutch, coils, fans, filter, thermostat, drain, belt, and electronics, Any of those parts could fail in a number of ways. Just to inspect it you need a custom gauge set, a tank of R134a, and a vacuum pump.

Etcd is about as complex as an A/C system. That is one of a dozen components of a Kubernetes system, before we get into custom integrations, which you will need about another dozen of.

The million dollars is to pay for everything needed to set up and maintain all of that, create the custom integrations that do not come turn-key from the community, create the custom integrations the community doesn't even have, integrate it with your development and deployment systems, business requirements, application-specific needs, and so on.

A million is an average. You can get away with less, just like you can get away with pumping a pre-pressurized A/C system with extra coolant: if you're lucky it won't break. When it does, I hope you have either a lot of time, or a lot of money to pay a consultant.

Re: Do I Need Kubernetes?

#143
post #3

I only have one tiny detail: Bursty traffic means that your cluster needs to be able to deal with the peaks. If you running an on prem Kubernetes cluster, then there is no savings, unless you can use the capacity for something else during non peak periods. The scaling, and potential savings is a cloud feature, not a feature of Kubernetes.

If the burst is for all apps at once, then yes. But if you need to handle temporary bursts of a single app among manh, then hosting them in a heterogenous cluster will give you benefit.

Re: Do I Need Kubernetes?

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

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…

I’ve always thought a reasonable pragmatic solution is to force configuration files to be loaded based on an optional env variable. Kubernetes can easily mount a complex configuration file via a volume or configmap (configmapgenerator is awesome). As long as the path is configurable and the env var is documented - it’s not so bad.

Re: Do I Need Kubernetes?

#145
post #23

I work for a startup whose product is small (half a dozen servers, if relatively beefy ones) clusters that will be run on-prem by customers, at least sometimes in a low-to-no-touch capacity. Most of our application components are micro-ish services that are run on all hosts in the cluster for either extra capacity or fault tolerance. We currently run everything on mesos/marathon, but are looking to switch away from i…

I know companies that use these folks to help manage “on other folks prem” K8s deployments: https://platform9.com/

Re: Do I Need Kubernetes?

#146
post #6

> Run your applications in Docker from day 1 (with docker-compose it’s as valuable for dev as it is for production) and think carefully before letting your applications store local state. I think this is the key take away for many startups. Get it so you: 1. Have a single-command way to bring up your entire backend 2. That command can run on your dev machine 3. You document all of the settings for your containers and…

How do you develop/IDE/debug apps like this though?

Multiple approaches I've seen in the past. My most recent approach is to rely heavily on unit tests and do 99% of your testing there. Before opening a PR/MR/CL into `master` I test my feature out end-to-end using `docker-compose up --build service_name` and make API calls or use the UI to test everything. Code coverage keeps my confident that everything works, my tests automatically run on all other engineer's machines, I can test the code in a very-close-to-prod environment, life is good.

Another approach, from a previous startup, who mainly/only used PHP was to volume mount the code you were editing into the containers that were running and to expose an xdebug port for our IDEs to connect to. This was very hacky and error prone but when it worked it worked.

Something that I plan to do in the future is to setup some incremental build system that can build all of my software and use that to build my containers. Whenever these outputs change I'll have them redeploy the container in docker-compose or minikube. This way I get very fast builds, very small containers, and much fewer hacks.

Re: Do I Need Kubernetes?

#147

Earlier quoted context omitted.

Do you have any examples of non-proprietary solutions?

Knative + buildpacks is one. CloudFoundry is open source too (although CF now runs on Kubernetes I think)

Cloud foundry offers their old(er) architecture as well as 2 ways to get the “cf push” experience over Kubernetes. Check out KubeCF and cf-for-k8s. Both of these are open source projects that you can deploy to a Kubernetes infrastructure of choice.

[1] https://github.com/cloudfoundry-incubator/kubecf [2] https://github.com/cloudfoundry/cf-for-k8s

Re: Do I Need Kubernetes?

#148

Earlier quoted context omitted.

`kind` and `k3d` are great but I don't think their aimed at being a developer friendly cluster from what I understand. They both require a lot of tweaking and setup to make them look like their a managed kube cluster (LB, storage, ingresses, etc). I wish there was something that could create a kube cluster that: 1. sets up automatic port forwards to my host system 2. handles ingresses by binding port :80 on my system…

I have a script that simplifies creation of kind clusters with local registry and ingress https://github.com/MoserMichael/kind-helper (to make it more developer friendly that is) but i guess kind is more for automation testing purposes as it runs all modes in docker containers on the same machine.

Looks like a nice tool. If it could watch for changes, rebuild, repush, and restart pods it would be the perfect dev environment. Even still this looks like a great start. Have you thought about polishing it a little more and doing a Show HN?

Re: Do I Need Kubernetes?

#149
post #6

> Run your applications in Docker from day 1 (with docker-compose it’s as valuable for dev as it is for production) and think carefully before letting your applications store local state. I think this is the key take away for many startups. Get it so you: 1. Have a single-command way to bring up your entire backend 2. That command can run on your dev machine 3. You document all of the settings for your containers and…

How do you make sure it is available on container_name.local.company.com whenever a new container is added?

Re: Do I Need Kubernetes?

#150

Earlier quoted context omitted.

At my current company, since I'm using gRPC, the build contexts for my containers are annoyingly large and I'm definitely feeling this. It's a massive pain and really annoys me but If I had to choose between 40 minutes of stressful debugging of someone else's config files vs 40 minutes of waiting for a command to finish, I'd take the latter. Long term I'm planning on moving these builds to bazel and taking advantage…

Why not just have a shared volume for your dependencies? That way nothing needs to rebuild. Then just have a different Docker-compose config for prod

The main reasons are:

    1. My applications have no dynamic "linking"
    2. The containers are distroless
    3. Services can be built independently
    4. I run the same exact sha in dev/staging/prod
To do what you're suggesting would require giving up one of my features which for me is not worth the trade off of a one-time setup 40min build of 20+ services (~2min/service). The last time I paid that 40min cost was ~2 months ago when I reformatted my hard drive.

The better solution for me is looking into a build system that can support my different language and tooling choices which happens to be things like Blaze (Bazel/Pants/Buck/Please).

Post reply on HN