Support of K3s to reduce attack surface #11463
Replies: 3 comments 7 replies
-
|
I think your comparison compares For example:
Security argument is at least questionable, as removing code doesn't always lead to better security - Kubernetes has more eyes and testing, while K3s might have introduced security issues by "removing" code. I'd say I'm not convinced :) |
Beta Was this translation helpful? Give feedback.
-
|
Every decision has trade-offs. I understand that K3s tries to simplify Kubernetes management by repackaging Kubernetes. Talos simplifies Linux by only running 1 thing. SQLite has trade-offs too. I agree it is simpler to understand and I've long been a proponent that upstream Kubernetes should investigate making a local file database an option (and maybe the default option). You can't do highly available control plane nodes without additional syncing and complexity, but individuals should be able to decide if they need that. Talos supports single node CP with standard etcd. Your comparison of resource usage might apply for single node SQLite, but if you want the option to scale to multiple CP nodes (via etcd) then Talos uses fewer resources. And if resource usage is really a concern and you are ok using a single CP node then I would suggest you look at kubesolo which reduces the footprint even further and gets rid of more code than K3s (eg no scheduler). If you have specific CVEs that K3s mitigates that Talos doesn't we'd love to hear about them! To my knowledge K3s default configuration is still less secure that Talos no matter how much code is in the the Kubernetes distribution. |
Beta Was this translation helpful? Give feedback.
-
|
as you both raised similar request, here is an analysis of vulnerabilities impacting k8s and how they were or could have been mitigated automagically by k3s. Its one part of big research report so tell me in case you would like me to share full report with you. --- here we go --- 3.1 Datastore Vulnerabilities:
|
| CVE ID | Affected K8s Component | Vulnerability Summary | Mitigated in Default K3s? | Mitigation Mechanism | Reasoning / K3s Component |
|---|---|---|---|---|---|
| CVE-2025-1974 | ingress-nginx |
Critical RCE via malicious annotation injection in the admission controller, leading to potential cluster takeover. ^8^ | Yes | Component Replaced | K3s bundles Traefik by default, which is architecturally immune. Traefik does not use configuration templating or an exploitable admission controller design. ^14^ |
| CVE-2023-25161 | etcd |
Information disclosure of key names via the LeaseTimeToLive API to users without read permissions. ^1^ | Yes | Component Replaced | K3s uses an embedded SQLite database by default, not etcd. The vulnerable component and its API do not exist in a default installation. ^2^ |
| CVE-2024-5154 | CRI-O |
High-severity path traversal allowing a malicious container to create symlinks on the host, leading to arbitrary file read/write. ^12^ | Yes | Component Replaced | K3s bundles containerd as its default container runtime, not CRI-O. The vulnerable runtime is not present by default. ^19^ |
| CVE-2022-2995 | CRI-O |
Incorrect handling of supplementary groups, potentially leading to privilege escalation or information disclosure in specific configurations. ^12^ | Yes | Component Replaced | K3s defaults to containerd. The vulnerability is specific to the CRI-O implementation and does not affect containerd. ^13^ |
| CVE-2021-25736 | kube-proxy (on Windows) |
Unintentional traffic forwarding from a LoadBalancer service to local node processes on Windows. ^26^ | Yes (in common deployments) | Deployment Context | The vulnerability is specific to Windows nodes. The majority of K3s deployments, especially in Edge/IoT, are Linux-based, making the CVE not applicable. ^28^ |
| CVE-2025-1767 | kubelet |
Access to other pods' local git repositories via the deprecated in-tree gitRepo volume type. ^20^ |
Yes (with hardening) | Architectural Philosophy / Policy | K3s's design eschews in-tree features. A hardened cluster would use policy (e.g., PSA) to block this deprecated and insecure volume type. ^22^ |
| CVE-2017-1000056 | PodSecurityPolicy Admission Plugin |
Privilege escalation allowing use of any existing PodSecurityPolicy object. ^32^ | Yes (in modern versions) | Component Evolution / Secure Defaults | PSPs are deprecated. Modern K3s uses Pod Security Admission (PSA) by default, which has a different, more robust security model. ^25^ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi everyone,
I'm a huge fan of Talos and its core philosophy. Focus on immutability and minimizing the attack surface by cutting out things like SSH and a general-purpose shell is exactly why I use it.
Following that same logic, I think it's worth considerering adding official support for K3s.
My main argument isn't about saving a few megs of RAM; it's about security alignment. Talos hardens the node, but we should also be thinking about hardening Kubernetes itself. This is where K3s shines. It's a conformant k8s distribution that has been aggressively stripped down, which directly reduces the attack surface of the control plane.
Here’s why it’s such a good fit:
etcdis a major operational headache. K3s replaces it with simpler options like embedded SQLite, removing a huge piece of complex infrastructure that can be misconfigured or attacked.Talos applies minimalism to the OS. K3s applies minimalism to Kubernetes. The combination feels like the logical endgame for anyone trying to build a truly secure, minimal stack from the metal up.
Quick Comparison: k8s vs. K3s
etcd(complex & critical)containerdto be installed separatelycontainerdis embeddedI know this isn't a zero-effort change and adds a new distribution for the team to maintain. But for those of us deploying in high-security or edge environments, a Talos + K3s option would be a killer feature that delivers on the project's core promise in a way nothing else can.
What does everyone else think? Are there technical blockers I'm not seeing?
Beta Was this translation helpful? Give feedback.
All reactions