Live data from Hacker News

Common mistakes using Kubernetes

blog.pipetail.io

31–40 of 149 posts

Re: Common mistakes using Kubernetes

#31
post #25

Earlier quoted context omitted.

>They said the reader wants to see an expert talking, as if experts never make mistakes or need to shift from one tact to another. Your editor was very fucking wrong.

So, so wrong. How did (s)he think experts get so good? Isn't the phrase `the master has failed more times than the apprentice has even tried` well known for a reason?

It obviously depends on the type of the book and the reader's expectations. It just might not have been the type of book where you write about things like that.

Re: Common mistakes using Kubernetes

#33
post #30
post #6

Great article, I've learned many of these firsthand and agree with their conclusions. I have some more reading to do on PDBs! K8s is a powerful and complex tool that should only be used when needed. IMO you should be wary of using it if you're trying to host less than a dozen applications - unless it's for learning/testing purposes. It's a complex beast with many footguns for the uninitiated. For those with the right…

What would you suggest as an alternative, simpler form for docker deploy, running and managing? Docker-compose?

What do you mean by docker hosting? Kubernetes (and other related tools) are container orchestration/management tools. As if often the case in the management space, if you're just running at small scale, you may not need anything beyond container command line tools and some scripts. You could also use Ansible to automate.

Re: Common mistakes using Kubernetes

#34

In my opinion, the most common mistake is not in the article : using kubernetes when you don't need to. Kubernetes has a lot of pros or the papers but in practice it's not worth it for most small and medium companies.

Do you also include managed kubernetes offerings, such as from Digital Ocean, in that assessment?

Oh yes. Managed kubernetes is full of various issues. Some major cloud providers sell very poor managed kubernetes.

If someone knows about a reliable managed kubernetes, please let me know.

Re: Common mistakes using Kubernetes

#35
post #17
post #3

... requiredDuringSchedulingIgnoredDuringExecution: ... This instantly remembered me of this: https://thedailywtf.com/articles/the-longest-method Kubernetes sometimes shows its Java roots.

> its Java roots Citation needed. AFAIR Borg is implemented in C++ and k8s has been implemented in Go from day 0. Am I missing some crucial steps in k8s's history?

Apparently the first version was based on a Java prototype, but it's unclear to me how much that's visible:

https://kubernetes.io/blog/2018/06/06/4-years-of-k8s/

> Concretely, Kubernetes started as some prototypes from Brendan Burns combined with ongoing work from me and Craig McLuckie to better align the internal Google experience with the Google Cloud experience. Brendan, Craig, and I really wanted people to use this, so we made the case to build out this prototype as an open source project that would bring the best ideas from Borg out into the open.

> After we got the nod, it was time to actually build the system. We took Brendan’s prototype (in Java), rewrote it in Go, and built just enough to get the core ideas across

Re: Common mistakes using Kubernetes

#36
> You can't expect kubernetes scheduler to enforce anti-affinites for your pods. You have to define them explicitly.

Why isn't this the default behavior? Why don't I have to go in and tell it that it's okay to have multiple instances on the same node? Why? So that I somehow feel like I've contributed to the whole process by fixing something that never should break in the first place?

I know of a few pieces of code where I definitely want to run N copies on one machine, but for all of the rest? Why am I even running 2 copies if they're just going to compete for resources?

Re: Common mistakes using Kubernetes

#37
post #25

Earlier quoted context omitted.

So, so wrong. How did (s)he think experts get so good? Isn't the phrase `the master has failed more times than the apprentice has even tried` well known for a reason?

It obviously depends on the type of the book and the reader's expectations. It just might not have been the type of book where you write about things like that.

>It just might not have been the type of book where you write about things like that.

I think that'd be more of the author's choice, instead of the editor.

Re: Common mistakes using Kubernetes

#38
post #36

> You can't expect kubernetes scheduler to enforce anti-affinites for your pods. You have to define them explicitly. Why isn't this the default behavior? Why don't I have to go in and tell it that it's okay to have multiple instances on the same node? Why? So that I somehow feel like I've contributed to the whole process by fixing something that never should break in the first place? I know of a few pieces of code wh…

Pod anti affinities did historically dramatically increase scheduling times. Not sure this is the primary reason, but probably one

Re: Common mistakes using Kubernetes

#39

Earlier quoted context omitted.

Do you also include managed kubernetes offerings, such as from Digital Ocean, in that assessment?

Not the OP but yes if cost is a factor. As far as I know no managed K8S offerings are cheap.

- DigitalOcean offers free clusters.

- Azure (still?) offers free clusters.

- GCP offers one free single-zone cluster.

If you need more than DO can offer in terms of compute instances, you can probably afford GKE/EKS, which is around 75$/month.

---

Running highly-available control plane (K8s masters & etcd) by yourself is NOT cheaper than using EKS.

To achive high availability, EKS runs 3 masters and 3 etcd instances, in different availability zones. Provisioning 3 t3.medium instances (4 GB of memory and 2 CPUs) would cost the same as a completely managed EKS.

Not to mention the manual work you need to setup, maintain and upgrade such instances.

Re: Common mistakes using Kubernetes

#40

In my opinion, the most common mistake is not in the article : using kubernetes when you don't need to. Kubernetes has a lot of pros or the papers but in practice it's not worth it for most small and medium companies.

Do you also include managed kubernetes offerings, such as from Digital Ocean, in that assessment?

Honestly my experience has been that managed k8s is often more complicated from a developer perspective than just k8s - sure, you don't have to deal with setting it up, but you have to figure out how all the 'management' and provider-specific features work, and they often seem pretty clumsily integrated.
Post reply on HN