this post was submitted on 16 Mar 2025
191 points (98.0% liked)
Selfhosted
60048 readers
734 users here now
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
Rules:
-
Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.
-
No spam.
-
Posts here are to be centered around self-hosting. Please ensure it is clear in your post how it relates to self-hosting.
-
Don't duplicate the full text of your blog or git here. Just post the link for folks to click.
-
Submission headline should match the article title.
-
No trolling.
Resources:
- selfh.st Newsletter and index of selfhosted software and apps
- awesome-selfhosted software
- awesome-sysadmin resources
- Self-Hosted Podcast from Jupiter Broadcasting
Any issues on the community? Report it using the report flag.
Questions? DM the mods!
founded 3 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I'm working on my first kubernetes cluster. I'm trying to set the systems up with NixOS. I can get a kublet and a control plane running. But I'm getting permission errors when trying to use kubectl rootless on the system running the control plane. I think I figured out which file i need to change, now I just want to record that change in my configuration.nix.
nixos doesn't play well with rootless containers in my experience
Ah sorry to hear that. Did you find something better that works for you? I'm open to suggestions :D
OciContainers just added rootless mode for podman. I was planning on playing a bit more with it but I'm quite busy and haven't fount the time recently. For the time being I run everything as rootfull since I don't expose stuff directly through the internet.
I might repond here if I don't forget once I've experimented a bit more.
Not who you asked but I moved to Talos Linux for k8s
I'm curious how this goes for you. I run all my machines on NixOS except my k8s cluster which is Talos for now. I have been thinking of switching to Nix for that too.
I followed along the nixos wiki for kubernetes and creating the "master" kublet is super easy when you set easyCerts = true. Problem is, it spits out files to /var/lib/kubernetes/secrets/ that is owned by root. Specifically, the cluster-admin.pem file. If I want to push commands to the cluster using kubectl I have to elevate to a root shell. I could just chmod or chown the file but that seems like a security risk.
Now I'm not familiar with k8s at all. This is my first go through, so I could be doing something wrong or missing a step. I saw something about the role based security but I haven't jumped down that rabbit hole yet. Any tips for running kubectl without root?