Selfhosted
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 posting.
-
Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.
-
Don't duplicate the full text of your blog or github here. Just post the link for folks to click.
-
Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).
-
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!
view the rest of the comments
Yeah - k8s has a bit of a steep learning curve. I recentlyish make the conversion from "a bunch of docker-compose files" to microk8s myself. So here are some thoughts for you (in no particular order).
I would avoid helm like the plague. Everybody is going to recommend it to you but it just puts a wrapper on a wrapper and is MUCH more complicated than what you're going to need because you're not spinning up hundreds of similar-but-different services. Making things into templates adds a ton of complexity and overhead. It's something for a vendor to do, not a home-gamer. And you're going to need to understand the basics before you can create helm charts anyway.
The actual yml files you need are actually relatively simple compared to a helm chart that needs to be parameterized and support a bazillion features.
So yes - you're going to create a handful of yml files and
kubectl apply -f
them. But - you can do that with Ansible if you want, or you can combine them into a single yml (separate sections with----
).What I do is - for each service I create a directory. In it I have
name_deployment.yml
,name_service.yml
, name_ingress.ymland
name_pvc.yml`. I just apply them when I change them, which isn't frequent. Each application I deploy generally has its own namespace for all its resources. I'll combine deployments into a NS if they're closely related (e.g. prometheus and grafana are in the same NS).Do yourself a favor and install
kubens
which lets you easily see and change your namespace globally. Gawd I hate having to type out my namespace for everything. 99% of the time when you can't find a thing withkubectl get
you're not looking in the right namespace.You're going to need to sort out your storage situation. I use NFS for long-term storage for my pods and have microk8s configured to automatically create space on my NFS server when pods request a PV (persistent volume). You can also use local directories but that won't cluster.
There are two basic types of "ingress" load balancing. "ClusterIp" means the cluster controller will act like a hostname-based router for HTTP. You can point your DNS entries at that server and it will route to your pods on their internal IP address based on the DNS name of the request. It's easy to use and works very well - but it only works for HTTP traffic. The other is to use LoadBalancerIp that will give your pods an IP address on the network that you can connect to directly. The former only works for HTTP, the latter will let you use any ports (e.g. ssh for a forgejo instance).
I agree. k8s and helm have a steep learning curve. I have an engineering background and understand k8s in and out. Therefore, for my helm is the cleanest solution. I would recommend getting to know k8s and it's resources, before using (or creating) helm charts.
Yeah - I did come down a bit harder on helm charts than perhaps I intended - but starting out with them was a confusing mess for me. Especially since they all create a new 'custom-to-this-thing' config file for you to work with rather than 'standard yml you can google'. The layer of indirection was very confusing when I was learning. Once I abandoned them and realized how simple a basic deployment in k8s really is then I was able to actually make progress.
I've deployed half a dozen or so services now and I still don't think I'd bother with helm for any of it.