News for hackers. Stuff that matters.
Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by breadwinner on Saturday July 13, 2024 @09:59PM (#40958315)
If you can't login to it then it is not good for development. If it is not good for development it is not good for production because ideally your dev and production environment should be the same.
Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by birdiesanders on Sunday July 14, 2024 @12:22AM (#40958820)
You shouldn’t be working on the node OS for k8s dev work.
Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by breadwinner on Sunday July 14, 2024 @10:32AM (#40961189)
You assume I was talking about the node OS, but I was talking about the container.
Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by breadwinner on Sunday July 14, 2024 @10:34AM (#40961197)
I said ideally your dev and production environment should be the same. That should have been a hint I was talking about container.
Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by rstat1 on Sunday July 14, 2024 @01:16AM (#40959003)
k8s is k8s, it doesn't really matter much what the host OS is.
Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by hadlock on Sunday July 14, 2024 @01:18AM (#40959025)
You should not be logging in to production unless something has gone seriously wrong. I've not seen a company where developers (minus a handful of "blessed" staff) even know how to access prod, let alone log in.
Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by breadwinner on Sunday July 14, 2024 @02:07AM (#40959180)
During development you will need to login to the pod, to review settings, directory contents and so on. If the OS running in the pod does not allow you to do that - during development - then that's severely limiting.
Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by gotbeans on Sunday July 14, 2024 @04:21AM (#40959659)
You can still exec yourself into the pods. No one said you cannot. There is no shell or ssh on the hosts for you to login to, but still if you absolutely must you can create a privileged container and mount /. Whole point is you shouldn't.
Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by vbezhenar on Sunday July 14, 2024 @03:04AM (#40959343)
Talos is OS running in the host. You can run in the pod whatever you need.

Also you shouldn't really use pod OS to debug it. Kubernetes supports debug containers: you launch a separate container (presumably with convenient debug environment) and mounts selected container rootfs inside, so you can inspect it as needed. It also helps, when the target container does not work and you can't just exec into it.

There's a recommendation to remove everything from the container that's not necessary for running a given program, that reduces attack surface.

Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by yjftsjthsd-h on Sunday July 14, 2024 @01:26AM (#40959054)
> If it is not good for development it is not good for production because ideally your dev and production environment should be the same.

Correct: Your dev environment should also not let you do stuff on the host machines. In an k8s environment, you run everything in pods. Don't compromise on security and operational concerns just because it's a dev environment.

> If you can't login to it then it is not good for development.

You develop inside pods, and you are more than welcome to install any shell and other programs you want inside containers. (Or for working at the k8s level it doesn't matter; you `kubectl apply` or run helm against the k8s API, it doesn't matter what's happening on the host.)

Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by breadwinner on Sunday July 14, 2024 @02:08AM (#40959190)
Is Talos for running inside pods, or running on the node. It is not immediately clear from the website.
Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by sierra1011 on Sunday July 14, 2024 @02:21AM (#40959220)
"Talos: Secure, immutable, and minimal Linux OS for running Kubernetes"

I guess we'll never know...

But in truth it's for running on hosts.

Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by FooBarWidget on Sunday July 14, 2024 @02:17AM (#40959211)
Some customers of an internal Kubernetes platform complain that their pods keep getting evicted because their nodes keep running out of disk space. The platform's maintainers' first instinct was that customers' pods should not write to ephemeral storage, e.g., should not write to log files on the filesystem unless mounted from external storage. But that turns out not to be the case: customers' pods did not write anything to disk at all. So why were nodes running out of disk space? Prometheus metrics show which partitions use how much disk space but cannot go into more detail. The team wanted to inspect the node's filesystem to figure out what exactly is using so much disk space. The first thing they tried is to run a management pod that contains standard tools such as 'df' and that mounts the host's filesystem. Unfortunately the act of scheduling a pod on that node causes it to experience disk pressure, and so the management pod gets evicted.

So, being dogmatic about "the host should not have any tools installed" is good and all, but how do you debug this scenario without tools on the host?

We eventually figured it out. By logging into the host OS and using the shell tools there.

Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by sierra1011 on Sunday July 14, 2024 @02:32AM (#40959253)
Sounds a lot like the host OS is generic instead of container-focused, which could be part of the problem.

What was the cause/solution? Images too big?

Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by FooBarWidget on Sunday July 14, 2024 @12:43PM (#40961886)
Actually, no, the host OS was Amazon BottleRocket, a specifically container-focused OS.

The cause was indeed images being too big. Images — not only the raw images, but also their extracted contents on the filesystem — count towards ephemeral storage too. In their case they can't even control the size of the images because those are supplied by a vendor.

The solution was to increase the node's disk space.

Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by sierra1011 on Sunday July 14, 2024 @02:34PM (#40962491)
Interesting, I use Bottlerocket on my work clusters too. I think we had issues like this using some ridiculous data tool images that take up gigabytes, so we just upped the EBS size. Easily done.
Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by yjftsjthsd-h on Monday July 15, 2024 @12:03AM (#40965189)
> So, being dogmatic about "the host should not have any tools installed" is good and all

Less dogma, more the lived experience that letting people log into hosts ends badly. Though I grant there's a cost/benefit both ways and perhaps there could be edge cases.

> but how do you debug this scenario without tools on the host?

Cordon the node, evict any one pod to free up just enough room, and then schedule your debug pod with a toleration so it ignores the error condition? I confess I've never had to do this but it seems workable.

Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by vbezhenar on Sunday July 14, 2024 @03:06AM (#40959352)
It's trivial to mount host root fs into container, so I don't see any issues "logging in" to it, as long as it works.
Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by antonvs on Sunday July 14, 2024 @05:26AM (#40959862)
It’s designed for running Kubernetes. You would log into the containers running on it if you need to, there’s no need to log into the underlying host. Managed Kubernetes clusters already work like this.
Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by cassianoleal on Sunday July 14, 2024 @05:29AM (#40959867)
I’ve been writing and managing development platforms on Kubernetes for 6-7 years.

In this time, I remember having to SSH into a host node exactly once. This was me, the platform engineer - not an application developer. Even then, having is a strong word. I could have just as well done with a privileged container with host access.

Application developers have nothing to do on the host. As in, they gain nothing from it, and could potentially make everything worse for themselves and the other applications and teams on the platform.

Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by breadwinner on Sunday July 14, 2024 @10:30AM (#40961178)
I was talking about logging into the container, not the node. Is Talos an OS for the node or the container?
Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by cassianoleal on Sunday July 14, 2024 @02:26PM (#40962444)
For the nodes. For the containers there's things like Google's distroless which are great for reducing attack surface as well.
Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by breadwinner on Sunday July 14, 2024 @04:14PM (#40962941)
Their website only says it is "for Kubernetes", that could mean containers, nodes or both.
Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by cassianoleal on Sunday July 14, 2024 @04:58PM (#40963171)
> Supports cloud platforms, bare metal, and virtualization platforms

> Production ready: supports some of the largest Kubernetes clusters in the world

> It only takes 3 minutes to launch a Talos cluster on your laptop inside Docker.

> delivers current stable Kubernetes

Whilst you're not wrong, and the website could be clearer, there are plenty of clues.

Re:Talos: Secure, immutable, and minimal Linux OS for runnin... by agilob on Sunday July 14, 2024 @08:14AM (#40960474)
We're long past the times when you would ssh into prod as root, run `nano /var/www/index.php` to fix a bug.