r/kubernetes • • Mar 23 '24

Kubernetes tutorial will be like

Post image
925 Upvotes

61 comments sorted by

68

u/[deleted] Mar 23 '24

You can deploy this simple tutorial app in a single yaml file from our github. Note that it will require an EKS cluster with a minimum of 12 ondemand 48xlarge c types, properly configured istio, external DNS, cert manager, external secrets, cni daemonset, csi daemonset, CSI: Miami daemonset. Keda and Karpenter recommended (it won't work without both of these for absolutely no reason). If you don't meet these requirements maybe consider not being such a peasant. Helm install is available but if you need to modify any values then, we'll, good luck.

Yeah some of these basic Kubernetes tutorials are really stretching the definition of 'basic'. And 'tutorial'.

117

u/RumRogerz Mar 23 '24

This should be on the front of an O’Riely book for kubernetes

53

u/spaetzelspiff Mar 23 '24

an O’Riely book

It's spelled O'RLY

89

u/sokjon Mar 23 '24

Apply all those reams of yaml files without understanding them, now good luck with day 2 operations!

39

u/TekintetesUr Mar 23 '24

Also, here's your complimentary choice of opinionated distributions, where a whole bunch of pre-applied yamls are already in there. All you have to do is pipe that .sh into your shell and good luck figuring out the rest.

21

u/pachirulis Mar 23 '24

Yeah, here's a stack of 15 opinionated tools and an explanation why all this is "the" way

1

u/soundboyselecta Apr 25 '24

That’s sound like basically present day IT shite. Add a nice you tube video and your gold.

2

u/[deleted] Mar 23 '24

[removed] — view removed comment

6

u/redvelvet92 Mar 23 '24

Policy as code reminds me of this tbh, solution looking for a problem.

1

u/pachirulis Mar 25 '24

Opa? I would never understand that monster

4

u/rabbit994 k8s operator Mar 23 '24

Helm.

29

u/goodbalance Mar 23 '24

I think Kubernetes Documentation suffers from its own disorganisation and nothing else. It tries to be beginner-friendly, but it also has so many "related" pages you just can't keep up with the context. On top of that, you have to think which network plugin - or however it's called - will just work out of the box so you won't have to research it for an entire week. Why can't they just show you the happy path with sensible defaults and then just deep dive into different topics? Honestly, some Medium articles and articles from random blogs are so much more helpful. Especially if you want to spin up a cluster yourself and not use something from the big providers.

30

u/shannonxtreme Mar 23 '24

The biggest reasons why are:

  1. There aren't enough expert contributors to the docs. Not product experts, documentation experts.

  2. When k8s first came out, documentation organization still followed DITA (concepts > tasks > reference) for the architecture. This isn't great for a user because there's no, like you say, "happy path" to follow.

Recently we've focused more on the job to be done by the user, but it's very hard to migrate an existing massive doc set to this model.

  1. K8s suffers from being the base project that needs to document everything for a hugely diverse audience. 3p providers need the docs, platform admins need the docs, developers need the docs. Because of that audience, we end up documenting everything.

The release cycle never ends so new docs keep getting added. We don't have enough regular contributors to the English localization. The localized docs are also staffed by a tiny number of volunteers (meaning that any major change to the docs structure would be a huge localization effort).

I think there's opportunity for improvement but it'll be very slow going. Maybe someone could open an issue to document a specific task by organizing existing documents into a happy path. Like "Create a locked-down cluster and deploy workloads to it" which organizes the docs that support that task.

Any change needs localization work so at this point we have to be very picky about what the project actually has capacity to work on, sadly

5

u/globalvariablesrock Mar 23 '24

sounds like arch and gentoo docs to me.

4

u/[deleted] Mar 23 '24

I also wonder about the quality of a majority of the documentation for very large systems, which could not be discovered by simply consulting the source code...

What are the conditions under which these documents are produced so that they are sometimes so bad?!

3

u/RavenchildishGambino Mar 24 '24

Kube-router generally just works out of the box.

You (usually) don’t have to touch it much.

KISS.

19

u/SolarPoweredKeyboard Mar 23 '24

And yet, somehow, that owl is never quite finished

4

u/Flat_Ad_2507 Mar 23 '24

no worrries it will be new toll instead to repair kubernetes ....

17

u/FemaleMishap Mar 23 '24

I thought that I was pretty savvy, but like seriously... Every bloody tutorial is like this, and I can't get most of them to work. Like, just freaking tell me how to go from a Debian netinstall to a control plane node. No magic invisible steps... Hell an Ansible playbook that's not 5 years old on an abandoned GitHub would be a start.

8

u/OhBeeOneKenOhBee Mar 23 '24

I've been thinking a lot about a blog/doc/tutorial series called "Kubernetes for Sysadmins", when I started I knew what containers, docker and docker-compose was but I just couldn't grasp the concept of Kubernetes for a long time, not the way it was explained by 90% of the tutorials out there.

But thinking about it in familiar terms helps. In the simplest terms, an Ingress Controller is a Reverse Proxy (HAProxy, Nginx) and each Ingress is a proxied resource (access rule/frontend), a Service is a backend/upstream and can divide traffic in different ways, pods are groups of applications and so on. I think the whole container ship analogy works for some, but for others it mostly confuses things they know with new terminology and no good way to reconcile the two

2

u/MindlessRip5915 Mar 23 '24

Have you seen the Illustrated Children’s Guide to Kubernetes?

It’s actually comically (see what I did there?) easy to understand. But of course, like all parts of the project, only gets as much attention as the project maintainers have time for.

an Ingress Controller is a Reverse Proxy (HAProxy, Nginx)

I’m not sure on this characterisation. I wouldn’t call AWS Load Balancer Controller a Reverse Proxy for example, it’s more like a builder just waiting for requests to build reverse proxies, which the Ingresses are probably better characterised as.

1

u/OhBeeOneKenOhBee Mar 24 '24

I have! And it is fantastic in its own way, but only goes so far, a few years ago I remember reading it and thinking "yep, container ship, I got it", but it did little for me to actually build those connections in my head. And very much comical indeed 😁

I’m not sure on this characterisation. I wouldn’t call AWS Load Balancer Controller a Reverse Proxy for example

I mean... At its core it kind of works the same way, even though AWS spins up multiple instances. On non-cloudprovider k8s the ingress is (very generally) shared between cluster resources in the same/a similar way someone would have a reverse proxy for a docker server, each ingress-service pair represents the same functionality as a frontend/backend pair in haproxy and server/upstream pair in nginx. This would be paired with an actual overview of what happens in the container when you change an ingress resource

It will definetly need some work, and many footnotes and comments, but I really think those kinds of characterisation are generally easier to follow for some of those with pre-existing knowledge.

1

u/MindlessRip5915 Mar 24 '24

I mean... At its core it kind of works the same way, even though AWS spins up multiple instances

I would disagree with that. The Load Balancer Controller is the pod running inside the cluster monitoring for Ingress resources with ingress classes that match the controller's resource type, then deploying physical ingresses that reconcile to the Ingress resource. For Nginx Ingress, there's the Ingress Controller which deploys Nginx reverse proxy configuration to Nginx Ingress pods for example. For AWS ALB Controller, it reconciles the Ingresses to Load Balancer Target Groups and Listeners. The Controller is not the Ingress.

2

u/OhBeeOneKenOhBee Mar 24 '24

I have to admit defeat, I've looked it up and you are right, I did confuse the terminology. Thank you for taking the time!

I've actually started putting some of it together, and the more I read the more I realize that I'm gonna get stuff wrong, so I'll likely put it on Github to be able to manage suggestions and help from the community, that likely gives it a better shot of staying up to date and to correct any mistakes

6

u/rgar132 Mar 23 '24

If you don’t mind translating from rhel9 I’ve got a few tutorials I’ve written I can share

2

u/FemaleMishap Mar 23 '24

That might be quite useful

2

u/Heteronymous Mar 23 '24

Please do share

1

u/rgar132 Mar 23 '24

Posted

1

u/Heteronymous Mar 23 '24

Thanks! 👍🏼

3

u/[deleted] Mar 23 '24

Is Ansible well-documented ?

7

u/FemaleMishap Mar 23 '24

It's got a few gaps but yes, it's quite well documented

1

u/quantumfirecracker Jul 27 '24

What are the gaps?

4

u/UntouchedWagons Mar 23 '24

I can recommend techno Tim's k3s-ansible playbook.

16

u/yolobastard1337 Mar 23 '24

you missed the step where helm turns those circles into a hairy cock and balls that you're not quite sure whether to keep or not

4

u/cholantesh Mar 23 '24

I'd still take it over kustomize...

6

u/Digging_Graves Mar 23 '24

Kustimoze is just easy to read yaml unlike helm charts that are an complete abonimation of hard to understand variables.

1

u/cholantesh Mar 23 '24

The template format is similar enough to Jinja, which we have experience with that we haven't really found reading templates challenging. But we have had more years of struggling with kustomize than months struggling with helm, so maybe there is pain incoming. :)

5

u/rabbit994 k8s operator Mar 23 '24

Why? Last two companies we have jettisoned Helm for Kustomize and everyone seems happier. They are mostly just CRUD RestAPIs with Nginx-Ingress.

2

u/cholantesh Mar 23 '24

From our experience managing multiple clusters, particularly when upgrading components and troubleshooting, having to manage overlays was significantly more painful than a values.yaml per env and a set of charts to apply therein.

9

u/nomadProgrammer Mar 23 '24

Istio documentation be like "fuck off"

11

u/nekokattt Mar 23 '24

nginx ingress controller docs be like "refer to the nginx documentation" and then proceeds to document everything using different naming schemes and half the supported options are only "documented" in the source code itself.

aws lbc docs be like "step 1: add this massive IAM policy that grants a billion permissions you probably dont need; step 2. install it from the helm chart, step 3 it works and if it doesnt then sucks to be you"

I just want an ELI5 example to handhold me and tell me I'm not being stupid.

7

u/TapeDeck_ Mar 23 '24

"now let's install rancher so we can manage everything with a nice web interface!"

"Okay in this next tutorial, pull these files from my GitHub and fire up kubectl..."

Like I've never seen one of these tutorial people that walk you through installing rancher actually show you how to deploy and manage workloads and clusters with it.

4

u/[deleted] Mar 23 '24

Here are 14 videos lessons on the technological progression from servers to cloud to k8s. Now, for those of you still watching, we dive into the abyss.

3

u/bonanzaguy Mar 23 '24

It really do be like that.

2

u/u_Leon Mar 24 '24

Guys if you need a straightforward k8s tutorial, I can't recommend Rancher Rodeos enough. They are free online events, happen like once a month or two. You get your own cloud VMs and have step by step instructions, plus a tutor who explains it all.

If you want a simple way to set up a damn cluster and start running some apps then it doesn't really get better than this. It is missing a few pieces necessary for full production (eg. proper certs instead of self-signed) - but for a PoC / dev sandbox /test kind of environment this is all you will need.

2

u/techchad22 Mar 24 '24

Good luck installing monitoring with Prometheus and garna.

3

u/samtheredditman Mar 23 '24

Sometimes I see posts like this and wonder if I'm missing something.

You got a container image that runs an app. So you make a pod spec that runs that container. You need to hook up the networking so you make a service. You want multiple copies of the app so you make a horizontal pod autoscaler. You need a way to detect if your pod is ready to serve requests so you add readiness probes. You want a low impact way to get a heartbeat so you make a liveness probe. You're got multiple apps running in your cluster that aren't related to each other so you start using namespaces. 

It goes on and on, but each individual piece is all pretty simple tbh. Just implement the things you need as you need them. If you're trying to catch up to your workplace's standards, ask what the standards are and then implement the pieces you need to satisfy those standards.

6

u/[deleted] Mar 23 '24

What do you mean by making a service? Did you miss the part where you need to install the CNI plugin for basic container networking?

1

u/samtheredditman Mar 23 '24

The book title is how to manage apps in kubernetes, not how to setup a cluster.

-1

u/area32768 Mar 23 '24

What does the owl signify here?

5

u/Professional_Bike647 Mar 23 '24

Nothing particular. „step 2-Draw the rest of fucking owl“ is a meme about garbage howtos.