5 ms·
> And then you have those pods, which are collections of services (e.g. postgres + api server + some cache). Pods are not intended to bundle those 3 services.
by thinkmassive 3y ago
> And then you have those pods, which are collections of services (e.g. postgres + api server + some cache).
Pods are not intended to bundle those 3 services. Typically one would use higher level abstractions (Deployment for the API, StatefulSet for the database), each composed of multiple Pods that should be scheduled on different physical machines.
It’s no wonder you’ve had a bad experience trying to use it the way you describe. Following the intended patterns provides a standard way to achieve rolling updates, horizontal autoscaling, and a ton of other functionality that used to be bespoke code at each organization. The old way was often buggy, and onboarding new engineers took much longer.
- thunky 3y agoMaybe their terminology was wrong, but what about this point: > But in the case of postgres, why wouldn't you have a dedicated cluster Does k8s not push you to mix postgres pods in the same host as your API pods? Unless you go out of your way to handicap it. I understand the appeal of applying the k8s (or swarm, or nomad) model to stateless API containers, but mixing in stateful db containers and pretending they're all equivalent makes less sense to me.
- thinkmassive 3y agoMany applications don't need multiple physical machines worth of database. Persistent storage has been a solved problem, especially when using a managed Kubernetes service. What's the problem with running stateful workloads on a cluster?
- thunky 3y agoWhat's wrong is that it adds extra layers of abstraction just to satisfy k8s. Extra layers aren't free.
- lakomen 3y agoI'm not an idiot so don't treat me like one. I know what I'm talking about, unlike you apparently. You can have all that without k8s. k8s doesn't equal auto scaling, "rolling updates". You are a booksmart idiot.
- lakomen 3y agohttps://kubernetes.io/docs/concepts/workloads/pods/ https://kubernetes.io/docs/concepts/workloads/pods/ This guy, seriously. Completely ignores everything I wrote and starts bullshitting.
- thinkmassive 3y agoWhere on that page is it recommended to bundle your entire infrastructure stack into a single pod?
- thinkmassive 3y agoMy intent wasn’t to criticize you, but apparently I stuck a nerve… Of course you can have all that without k8s. I’ve been operating cloud infra for over a decade, and I used to roll my own solutions to implement that functionality, so I’m quite familiar with that approach. Embracing kubernetes has made life much easier. I do read a lot, but my opinion is based on operating production systems. Whether you like it or not, k8s has become the defacto standard interface for distributed systems. High level programming languages and libraries provide useful layers of abstraction in their own domains. Do you also reject those, and use assembly language for everything?