News for hackers. Stuff that matters.
Re:Kustomize – Templating in Kubernetes by founderling on Saturday April 20, 2019 @01:57AM (#19705023)
Often when I talk to founders who use Kubernetes, they could simply use docker and a bit of shell scripting instead.

Those of you who use Kubernetes: What is a functionality it brings to the table you would miss if you automated your docker handling without it?

Re:Kustomize – Templating in Kubernetes by vitalus on Saturday April 20, 2019 @02:08AM (#19705059)
- Simple DNS based service discovery

- namespace separations between resources

- optimized resource utilization and container scheduling

These are the biggest 3 for the smaller orgs I’ve been a part of

Re:Kustomize – Templating in Kubernetes by founderling on Saturday April 20, 2019 @02:17AM (#19705083)
Interesting. Can you give an example of why DNS based service discovery was needed?
Re:Kustomize – Templating in Kubernetes by markbnj on Saturday April 20, 2019 @02:27AM (#19705110)
> Can you give an example of why DNS based service discovery was needed?

Not to be flippant, but any case where things need to connect to other things. At scale they usually need to connect to other things through some sort of load balancer. You get that out of the box with kubernetes for services hosted inside the cluster, and there are straightforward solutions to ingress for clients outside it. Another important feature is pod scheduling. Yes you could wire up a few machines using docker compose and any of a few different networking approaches, but if one of your VMs dies are those workloads going to move to a healthy instance by themselves?

Re:Kustomize – Templating in Kubernetes by seabrookmx on Saturday April 20, 2019 @02:31AM (#19705123)
Need is a strong word.

But you don't need containers either.

Service discovery just makes it easier to link up services if your architecture is truly microservice. We used to have an incredible amount of config that tightly coupled our API's.. now we use a combination of service discovery and an API gateway (Ambassador) to decouple the services, cut down on the number of random endpoints in our config, and we also get the added benefit of load balancing, rate limiting, and additional logging.

There's always a tradeoff with scale. If you have four servers than obviously all of this stuff is overkill.

Re:Kustomize – Templating in Kubernetes by andrewstuart2 on Saturday April 20, 2019 @02:35AM (#19705138)
> If you have four servers than obviously all of this stuff is overkill.

I disagree, actually. I have four servers at home, and have some pods that have been running little tinkery things, and a bunch of open source software, with ridiculous uptime and little or no effort, even when I reboot one of those "servers" to do some gaming on Windows.

Now, do I need that uptime for all of those services? Not really. But for some of them, I want it, and it'd be annoying if I had to go figure out why they'd stopped running. The reality is, things just keep ticking without me worrying when they're on k8s.

These skills transfer into very in-demand job skills as well, and if I ever build anything that gains traction, I already have all the tools, configs, and knowledge to deploy that app across 500 generic cloud servers.

Re:Kustomize – Templating in Kubernetes by jrockway on Saturday April 20, 2019 @05:37AM (#19705607)
I agree with you. I think people tend to associate Kubernetes with the other underlying problems they're having with their infrastructure when they start thinking about using it. Just like it's tough when moving from 0 pieces of software in production to 1 piece of software in production, it's just as tough moving from 1 piece to 2 pieces. But if you do that transition correctly, then the 2 to infinity part is easy. I think you will find it just as painful to make that move with any orchestration system. (CloudFormation? Convox? They're not easy, and you get the feeling that nobody else is using them.)

I wouldn't recommend Kubernetes if you only have one application you run in production. Just rsync your production image to production whenever you remember to do a release. But if you have more than 1 thing, it's time to start thinking about it, because the "do whatever" that works great with 1 thing starts to break down when 1 becomes 2. That is not Kubernetes's fault. That's just the nature of the beast.

Re:Kustomize – Templating in Kubernetes by andrewstuart2 on Saturday April 20, 2019 @02:28AM (#19705114)
Because I can run `ping` in a busybox container that knows how to do all the same service discovery as a more complicated fully fledged microservice. No extra libraries. No smattering of supporting services (on top of DNS, which you need anyway, of course). Setup and debugging is 10x simpler than any of the more complicated service discovery solutions.

And it just works. Simply and intuitively. With everything. Because it's been an IETF standard since 1983.

Re:Kustomize – Templating in Kubernetes by Benjamin_Dobell on Saturday April 20, 2019 @07:48AM (#19706020)
Unless you're already a k8s guru, then I don't really recommend k8s for most start-ups. Also, even if you are contemplating moving to k8s, I'd suggest waiting until https://github.com/kubernetes-sigs/cluster-api-provider-aws stabilises.

In saying that, I've just performed a reasonably significant migration to k8s, and despite the significant time investment, I am quite happy with it.

However, prior to this we spent 5 years on Dokku[1], which is freaking fantastic project and was for the most part more than enough to meet our needs. It solves pretty much all the same issues start-ups use k8s for, with a lot less overhead.

The reason for the migration was simply that we've reached the point where our clients demand improved reliability (redundancy) and somewhat coincidentally we'd outgrown some other infrastructure; which on its own would require a large migration. So we moved to k8s at the same time as rejigging our infrastructure, for redundancy and future-proofing purposes.

[1] https://github.com/dokku/dokku

Re:Kustomize – Templating in Kubernetes by solatic on Saturday April 20, 2019 @04:00AM (#19705358)
We're a B2B company with a microservice-architecture SaaS that wants to start to sell an on-prem offering. Kubernetes is a no-brainer.

Even if we had a monolith instead, and no plans for an on-prem offering, ultimately I still think that a managed Kubernetes offering makes sense. Efficient resource utilization is all the more important for small companies, and once you have more than a handful of servers, Kubernetes makes it much easier to right-size your fleet by handling all of the scheduling for you.

If you have a couple of servers and that's it, then sure, Kubernetes isn't giving you much. But if you're building a professional offering then you're likely to outgrow that couple of servers pretty quickly.

Re:Kustomize – Templating in Kubernetes by founderling on Saturday April 20, 2019 @06:00AM (#19705667)
Are you sure you can't simply run it all from a single server? Computers are pretty fast these days.
Re:Kustomize – Templating in Kubernetes by solatic on Saturday April 20, 2019 @02:27PM (#19708074)
It's a big data company doing an amount of traffic per day that exceeds what you can fit in RAM, including those fancy x1.32xl's with 2 TB RAM and a monthly cost of ~$6,000 for a reserved instance.

Yeah, I'm pretty sure we can't simply run it all from a single server.

Re:Kustomize – Templating in Kubernetes by marcinzm on Saturday April 20, 2019 @01:10PM (#19707608)
And then the server goes down and you've got downtime. Or you want to release a new version and you have downtime (ie: no rolling upgrades). At some point you end up re-inventing enough of k8s to makes it sort of silly to not use the actual thing.
Re:Kustomize – Templating in Kubernetes by marcinzm on Saturday April 20, 2019 @01:21PM (#19707669)
I run a data infrastructure on terraform and kubernetes. Things it gives me out of the box:

* DNS. This lets all the various components talk to each other across nodes (Airflow, Spark, Zeppelin, etc.). I can also, via VPN, connect to things to look at what's going on.

* Load-balancing. I create pods and then they run on the node where there's capacity without me thinking about it.

* Auto-scaling. I spin up pods and nodes get created to handle the load.

* Helm charts for things so I don't have to figure out how to run them myself.

* Built-in support in the tools I use. Airflow will spin up k8s pods to run tasks. Spark will spin up pods to run a job. Etc.

Re:Kustomize – Templating in Kubernetes by jhgaylor on Saturday April 20, 2019 @03:12AM (#19705237)
I feel like getting to the point that my container restarts when it dies is hard from just userdata loaded in when the instance is created. Everyone will let me spawn a base image with docker installed and shove in a userdata script but I want to say "please run these 3 docker images and if any of them die restart it" Additionally in k8s I can say "oh and update my dns provider to point to this pod and by the way stick TLS in front of it". I like those last bits a lot too.
Re:Kustomize – Templating in Kubernetes by jjeaff on Saturday April 20, 2019 @06:39AM (#19705786)
I only run on a 2+ node cluster.

-Rolling deployments

-auto scaling pods and nodes

-health checks and self healing

Re:Kustomize – Templating in Kubernetes by quickthrower2 on Saturday April 20, 2019 @03:34AM (#19705291)
That's a question I ask myself. I use Kubernetes because I inherited a Terraform/Kubernetes project. I like the way it all works now I have learnt it, but I wouldn't have been brave enough to set that lot up on my own. I'd probably use a VM and Shell script. But I'm glad for the experience.
Re:Kustomize – Templating in Kubernetes by speedplane on Saturday April 20, 2019 @03:43AM (#19705309)
> I use Kubernetes because I inherited a Terraform/Kubernetes project... but I wouldn't have been brave enough to set that lot up on my own. I'd probably use a VM and Shell script.

If you use a shell script to handle a cluster with a dozen docker images and nodes, with intermittent crashes, out-of-memory issues, running out of disk, or network failures, your shell script will be so complex that you will basically need to recreate kubernetes from scratch.

Re:Kustomize – Templating in Kubernetes by quickthrower2 on Saturday April 20, 2019 @05:26AM (#19705574)
Good point. The setup is quite simple in terms of number or containers/nodes. We are using Azure so would probably use cloud features to do the things you mention. A load balancer and a couple of VMs for example, with auto scaling set up.
Re:Kustomize – Templating in Kubernetes by speedplane on Sunday April 21, 2019 @03:30AM (#19710970)
> The setup is quite simple ... We are using Azure so would probably use cloud features ... [a] load balancer and a couple of VMs for example, with auto scaling set up.

Load balancing and auto-scaling are some of the more basic and popular services that kubernetes provides. If your platform already provides them for you, it makes the case for kubernetes weaker. That said, kubernetes can be run on multiple cloud providers, and provides far more features.

Once the complexity of the cluster grows, and vendor lock-in issues increase, kubernetes makes more and more sense.

Re:Kustomize – Templating in Kubernetes by cyansmoker on Saturday April 20, 2019 @03:34AM (#19705290)
Adding to what was already said:

- being able to force better design when engineers have to work with multiple services depending on each other (using start-up containers, readiness and liveliness, etc)

Re:Kustomize – Templating in Kubernetes by hueving on Saturday April 20, 2019 @02:04AM (#19705045)
Resume boosting. Using shell scripts is lame and straight forward. If you have a declarative configuration though you can scale to thousands of nodes with nary a thought.
Re:Kustomize – Templating in Kubernetes by marcinzm on Saturday April 20, 2019 @01:14PM (#19707626)
If you have a single service that runs of thousands of nodes then okay. If you have dozens of services that run across even dozens of nodes, that interact with each other, that have resource constraints, that need rolling updates, depend on external volumes, require security policies, etc. then you eventually recreate enough k8s to make it simpler to just use k8s.
Re:Kustomize – Templating in Kubernetes by jrockway on Saturday April 20, 2019 @05:39AM (#19705610)
What service did you scale across thousands of nodes with a shell script?
Re:Kustomize – Templating in Kubernetes by skboosh on Saturday April 20, 2019 @04:18AM (#19705402)
Network policies, RBAC, the ecosystem...