News for hackers. Stuff that matters.
Re:Bare-Metal Kubernetes with K3s by Damogran6 on Tuesday December 22, 2020 @11:17AM (#25507791)
I'm still looking for a good resource as someone who's taken their eye off the ball for a decade or so. Things have (and continue to) move at an astounding pace...and I'm needing something that goes from 'Pets and autoconf' to where we are now.
Re:Bare-Metal Kubernetes with K3s by neurostimulant on Tuesday December 22, 2020 @11:30AM (#25507946)
It's still using the same old stack, just containerized. For example, you're no longer manually editing nginx conf, but instead writing the config as yaml annotation to tell the nginx ingress what to do. Instead of editing wp-config.php when deploying wordpress, you specify the db config as environmental variables in yaml file, etc.
Re:Bare-Metal Kubernetes with K3s by systemvoltage on Tuesday December 22, 2020 @11:39AM (#25508101)
Can you explain why one would use Kubernetes? I know containerization but still haven’t figured out wtf Kubernetes is. Everyone and their mother keeps telling me it’s an orchestration tool for containers. It’s as helpful as saying a Pecan pie is an orchestration of flour, sugar and pecans.
Re:Bare-Metal Kubernetes with K3s by ericbarrett on Tuesday December 22, 2020 @01:08PM (#25509235)
Orchestration systems like Kubernetes, Amazon ECS, and (formerly, it’s pretty dead) Mesos run on a cluster of systems and coordinate over the network. What they’re coordinating is running your containerized services, for example your API server, micro services, etc. So you can tell the orchestration service “run 5 copies of this and listen externally on port 9000. When a request comes in on external_ip:9000, redirect it to one of the 5 service instances.” They will also restart your services if they die, keep stdout/stderr logs, and so forth. You can have very complex setups but most will never need more than what I’ve just described.

The main difference between the different orch. tools is how they pipe the data between Outside and the service cluster. Mesos didn’t help you, you had to build your own service discovery. ECS uses Amazon load balancers and some custom black-box daemons. Kubernetes famously uses a complex mesh of “ingress controllers” and kernel iptables/ipfw spoofing. All take their configurations in some form of JSON or YAML.

Re:Bare-Metal Kubernetes with K3s by systemvoltage on Tuesday December 22, 2020 @03:38PM (#25510951)
Thank you.

Is there some sort of a PID-feedback-loop control that monitors the CPU/memory load and helps spin up more instances if it sees more traffic? If Kubernetes doesn't do that, what piece of software can help automatically scale if there is a huge traffic spike?

Load balance AFAIK doesn't do that. It just helps distribute the load.

Re:Bare-Metal Kubernetes with K3s by jedifans on Tuesday December 22, 2020 @05:00PM (#25511805)
Using a HorizontalPodAutoscaler [1] you can scale up and down the amount of "pods" (a grouping of containers that are scheduled as a unit) based on the desired metric.

[1]: https://kubernetes.io/docs/tasks/run-application/horizontal-...

Re:Bare-Metal Kubernetes with K3s by tyldum on Tuesday December 22, 2020 @05:00PM (#25511807)
Autoscaling is a field of its own, yes. Lots of footguns, though.
Re:Bare-Metal Kubernetes with K3s by ninjha on Tuesday December 22, 2020 @01:11PM (#25509263)
Kubernetes is a multi-physical-machine operating system. In a typical OS you have CPU, RAM, etc. and the kernel decides how much of each to allocate to each running task. Kubernetes works the same way, but across multiple computers by default- and it can additionally manage any other arbitrary resource through the use of CustomResourceDefinitions (IPs, higher level concepts like “Minecraft Servers”, etc.)
Re:Bare-Metal Kubernetes with K3s by OJFord on Tuesday December 22, 2020 @01:13PM (#25509288)
If you want a (better) cooking analogy - if a container is a 'station' or a line cook in a professional kitchen, then Kubernetes is 'running the line', managing the kitchen, making sure everyone has the tools and ingredients they need.
Re:Bare-Metal Kubernetes with K3s by marcosdumay on Tuesday December 22, 2020 @11:50AM (#25508261)
"Orchestration" means it will manage how many of each container you have running, configuring, starting, and stopping them and possibly migrating them from one machine to another.

The term was created for virtual machines.

Re:Bare-Metal Kubernetes with K3s by aprdm on Tuesday December 22, 2020 @12:35PM (#25508850)
if you know systemd, one of its many functions is a single stop systemd controller for all of your infrastructure. Then it also gives you a single way to control storage, monitoring, load balancing and deployment from a single API.

It's neat. It is a lot of moving parts tho. I am just now trying it in a big infrastructure because we have so many bespoke parts that we have to glue together that we might as well try to use what is standard now...

Re:Bare-Metal Kubernetes with K3s by mrweasel on Tuesday December 22, 2020 @11:39AM (#25508084)
>For example, you're no longer manually editing nginx conf,

You now have to do the configuration in YAML, which is MUCH MUCH worse.

Re:Bare-Metal Kubernetes with K3s by zimbatm on Tuesday December 22, 2020 @12:01PM (#25508421)
Or more accurately, you now have to understand both the nginx.conf file format, and the right way to nudge the YAML so it produces what you want. Plus some intermediate wrapper script that sets things up on container start that does more funky things based on environment variables.
Re:Bare-Metal Kubernetes with K3s by nouney on Tuesday December 22, 2020 @03:14PM (#25510662)
I don't get it, how do you configure nginx with a YAML file?
Re:Bare-Metal Kubernetes with K3s by verdverm on Tuesday December 22, 2020 @04:00PM (#25511185)
You don't directly. You add some extra lines of yaml to an k8s ingress resource, nginx detects this and updates itself. A single nginx container can service many ingresses for each of your apps. The idea is to distribute the config to the app manifests they are related to