Many of the posts I read here are about Docker. Is anybody using Kubernetes to manage their self hosted stuff? For those who’ve tried it and went back to Docker, why?

I’m doing my 3rd rebuild of a K8s cluster after learning things that I’ve done wrong and wanted to start fresh, but when enhancing my Docker setup and deciding between K8s and Docker Swarm, I decided on K8s for the learning opportunities and how it could help me at work.

What’s your story?

  • Lung@lemmy.world
    link
    fedilink
    English
    arrow-up
    15
    ·
    1 year ago

    I manage like 200 servers in Google cloud k8s but I don’t think I’d do that for home use. The core purpose is to manage multiple servers and assign processes between them, auto scaling, cluster internal network - running docker containers for single instance apps for personal use doesn’t require this kind of complexity

    My NAS software has a docker thing just built into it. I can upload or specify a package and it just runs it on the local hardware. If you have a Linux shell, I guess all you really have to do is run dockerd to start the daemon, make sure your network config allows connections, and upload your docker containers to it for running

    • keyez@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      1 year ago

      My thinking is the same, I see lots of k8s mentions on here and from coworkers at home and all I use is docker and VMs because I don’t want all that complexity I have to deal with at work.

  • eodur@lemmy.world
    link
    fedilink
    English
    arrow-up
    11
    ·
    1 year ago

    Kubernetes is great if you run lots of services and/or already use kubernetes at work. I use it all the time and I’ve learned a lot on my personal cluster that I’ve taken to work to improve their systems. If you’re used to managing infra already then it’s not that much more work, and it’s great to be able to shutdown a server for maintenance and not have to worry about more than a brief blip on your home services.

  • PriorProject@lemmy.world
    link
    fedilink
    English
    arrow-up
    8
    ·
    edit-2
    1 year ago

    I use k8s at work and have built a k8s cluster in my homelab… but I did not like it. I tore it down, and currently using podman, and don’t think I would go back to k8s (though I would definitely use docker as an alternative to podman and would probably even recommend it over podman for beginners even though I’ve settled on podman for myself).

    1. K8s itself is quite resource-consuming, especially on ram. My homelab is built on old/junk hardware from retired workstations. I don’t want the kubelet itself sucking up half my ram. Things like k3s help with this considerably, but that’s not quite precisely k8s either. If I’m going to start trimming off the parts of k8s I don’t need, I end up going all the way to single-node podman/docker… not the halfway point that is k3s.
    2. If you don’t use hostNetworking, the k8s model of traffic routes only with the cluster except for egress is all pure overhead. It’s totally necessary with you have a thousand engineers slinging services around your cluster, but there’s no benefit to this level fo rigor in service management in a homelab. Here again, the networking in podman/docker is more straightforward and maps better to the stuff I want to do in my homelab.
    3. Podman accepts a subset of k8s resource-yaml as a docker-compose-like config interface. This lets me use my familiarity with k8s configs iny podman setup.

    Overall, the simplicity and lightweight resource consumption of podman/docker are are what I value at home. The extra layers of abstraction and constraints k8s employs are valuable at work, where we have a lot of machines and alot of people that must coordinate effectively… but I don’t have those problems at home and the overhead (compute overhead, conceptual overhead, and config-overhesd) of k8s’ solutions to them is annoying there.

    • whyrat@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      arrow-down
      1
      ·
      1 year ago

      I’d suggest Podman over docker if someone is starting fresh. I like Podman running as rootless, but moving an existing docker to Podman was a pain. Since the initial docker setup was also a pain, I’d rather have only done it once :/

      For me the use case of K8s only makes sense with large use cases (in terms of volume of traffic and users). Docker / Podman is sufficient to self-host something small.

  • mlg@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    1 year ago

    I am insane and use bare bone LXC.

    Stupid ramblings you can probably ignore:

    spoiler

    Usually though it’s because I run most stuff bare metal anyway so LXC is for temporary or random cases where I need a weird dependency or I want to run a niche service.

    Only use docker for when I actually want faster setup like docker-osx which does all the vm stuff for running a virtual Mac for you.

    I don’t really mind docker, but for homelab I just find myself rewriting dockerfile anytime I want to change something which I don’t really need to do if I’m not publishing it or even reusing it.

    Kubernates is really more effective for actual load services, which you never need in homelab lol. It’s great to use to learn k8s cluster, but the resources get eaten fast.


  • RegalPotoo@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    arrow-down
    1
    ·
    1 year ago

    Kubernetes is awesome for self hosting, but tbh is superpower isn’t multi-node/scalability/clustering shenanigans, it’s that because every bit of configuration is just an object in the API, you can really easily version control everything - charts and config in git, tools like Helm make applying changes super easy, use Renovate to do automatic updates, use your CI tool of choice to deploy on commit, leverage your hobby into a DevOps role, profit

  • pixxelkick@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    I have a K3OS cluster built out of a bunch of raspberry pis, it works well.

    The big reason I like kubernetes is that once it is up and running with git ops style management, adding another service becomes trivial.

    I just copy paste one if my e is ting services, tweak the names/namespaces, and then change the specific for the pods to match what their docker configuration needs, ie what folders need mounting and any other secrets or configs.

    I then just commit the changes to github and apply them to the cluster.

    The process of being able to roll back changes via git is awesome

    • Anonymouse@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      I’d love to hear more about your GitHub to K8s setup. I’ve been thinking about doing something similar, but I’m not sure how to keep my public stuff public while injecting my personalized (private) configuration during deployment.

  • humanaut@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    Nomad all the way. K8s is so bloated. Docker swarm can only do docker. Nomad can do basically anything.

    • iluminae@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      Nomad is a breath of fresh air after working with k8s professionally.

      Don’t get me wrong, love k8s, but it’s a bit much (until you need it)

      • Lupec@lemm.ee
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        I’ve been reading into k3s out of curiosity, which as I understand is supposed to be one of the simpler ones, and even as someone who works as a developer and maintains a small homelab, it just makes me feel utterly clueless lol. Which is to say, I’ll definitely be giving Nomad a good look.

        Oh and if you do happen to have any other more newbie friendly suggestions, I’d love to hear about them!

  • TheLordlessBard@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    Love is a strong word, but kubernetes is definitely interesting. I’m finishing up a migration of my homelab from a docker host running in a VM managed with Portainer to one smaller VM and three refurbished lenovo mini PCs running Rancher. It hasn’t been an easy road, but I chose to go with Rancher and k3s since it seemed to handle my usecase better than Portainer and Docker Swarm could. I can’t pass up those cheap mini PCs

  • You999@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    I’ve spent the last two weeks on getting a k3s cluster working and I’ve had nothing but problems but it has been a great catalysts for learning new tools like ansible and load balancers. I finally got the cluster working last night. If anyone else is having wierd issues with the cluster timing out ETCD needs fast storage. Moving my VMs from my spinning rust to a cheap SSD fixed all my problems.

  • macgregor@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 year ago

    My homelab is a 2 node Kubernetes cluster (k3s, raspberry pis), going to scale it up to 4 nodes some day when I want a weekend project.

    Built it to learn Kubernetes while studying for CKA/CKD certification for work where I design, implement and maintain service architectures running in Kubernetes/Openshift environments every day. It’s relatively easy for me to manage Kubernetes for my home lab, but It’s a bit heavy and has a steep learning curve if you are new to it which (understandably) puts people off it I think. Especially for homelab/selfhosting use cases. It’s a very valuable (literally $$$) skill if you are in that enterprise space though.

  • lwuy9v5@lemmy.world
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I am using Unraid to run docker, but want to use k3s (again) to turn some old laptops I have lying around into commodity hardware