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?

  • vsis@feddit.cl
    link
    fedilink
    English
    arrow-up
    6
    ·
    1 year ago

    Kubernetes is useful if you have gone full cattle over pets. And that is very uncommon in home setups. If you only own one or two small machines you cannot destroy infra easily in a “cattle” way, and the bloatware that comes with Kubernetes doesn’t help you neither.

    In homelabs and home servers the pros of Kubernetes are not very useful: high availability, auto-scaling, gitops integrations, etc: Why would you need autoscaling and HA for a SFTP used only by you? Instead you write a docker-compose.yml and call it a day.

      • andrew@lemmy.stuart.fun
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        I think the biggest reasons for me have been growth and professional development. I started my home cluster 8 years ago as a single node of basically just running the hack/ scripts on my Linux desktop. I’ve been able to grow that same cluster to 6 hosts as I’ve replaced desktops and as I got a bit into the used enterprise server scene. I’ve replaced multiple routers and moved behind cloudflare, added a private CA a few times, added solid persistence with rook+ceph, and built my ideal telemetry stack, added velero backups into Backblaze b2, and probably a lot more I’m not thinking of.

        That whole time, I’ve had to do almost zero maintenance or upgrades on the side projects I’ve built over the years, or on the self hosted services I’ve run. If you ignore the day or so a year I’ve spent cursing my propensity to upgrade a tad too early and hit snags, though I’ve just about always been able to resolve them pretty quickly and have learned even more from those times.

        And on top of that, I get to take a lot of that expertise to work where it happens to pay quite well. And I’ve spent some time working towards building the knowledge into a side gig. Maybe someday that’ll pay the bills too.

  • dap@lemmy.onlylans.io
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Running an RKE cluster as VMs on my ceph+proxmox cluster. Using Rook and external ceph as my storage backend and loving it. I haven’t fully migrated all of my services, but thus far it’s working well enough for me!

  • vojel@feddit.de
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I run k3s and all my stuff runs in it no need to deal with docker anymore.

  • tungtungss@lemmy.wanderia.online
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Used k3s to manage my single instance. Lots of gotcha moments to learn! Will add Flux for CD after I decide on how to self-host the Git server

  • AntBas@eslemmy.es
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I was looking into converting my docker services into a cluster to get high availability and to learn it for work, but while investigating it, I read that kubernetes is actually meant for scalability and just a single service per cluster.

    Also read that docker swarm is actually what is recommended for my homelab use case. So I’m right now on my way to convert everything to docker stacks. What do you think?

    • Lmaydev@programming.dev
      link
      fedilink
      English
      arrow-up
      0
      ·
      1 year ago

      I’m not sure what you mean by that.

      It provides high availability if you have multiple nodes and pods.

      Also what do you mean by single service per cluster? Because that’s not the idea at all.

      • AntBas@eslemmy.es
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        Of course high availability always requires multiple nodes.

        Its just that while choosing how to set up my cluster I looked up several options (proxmox, swarm, kubernetes…) and I noticed that kubernetes is generally meant for bigger deployments.

        I only need a single replica for each of my containers and they can all run on a single node, so kubernetes is overkill just to get high availability For my use case

  • orizuru@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    0
    ·
    1 year ago

    Seems a bit overkill for a personal use selfhosting set-up.

    Personally, I don’t need anything that requires multiple replicas and loadbalencers.

    Do people who have homelabs actually need them? Or is it just for learning?

    • kelvie@lemmy.ca
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      A lot of people thought this was the case for VMs and docker as well, and now it seems to be the norm.

      • orizuru@lemmy.sdf.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        1 year ago

        A lot of people thought this was the case for VMs and docker as well, and now it seems to be the norm.

        Yes, but docker does provide features that are useful at the level of a hobbyist self-hosting a few services for personal use (e.g. reproducibility). I like using docker and ansible to set up my systems, as I can painlessly reproduce everything or migrate to a different VPS in a few minutes.

        But kubernetes seems overkill. None of my services have enough traffic to justify replicas, I’m the only user.

        Besides learning (which is a valid reason), I don’t see why one would bother setting it up at home. Unless there’s a very specific use-case I’m missing.

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

      I find mine useful as both a learning process and as a thing need. I don’t like using cloud services where possible so I can set things up to replace having to rely on those such as next loud for storage, plex and some *arr servers for media etc. And I think once you put the hardware and power costs vs what I’d pay for all the subs (particularly cloud storage costs) it comes out cheaper at least with hardware I’m using.

  • PriorProject@lemmy.world
    link
    fedilink
    English
    arrow-up
    0
    ·
    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
      0
      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.

  • TheLordlessBard@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    0
    ·
    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

    • Osnapitsjoey@lemmy.one
      link
      fedilink
      English
      arrow-up
      0
      ·
      edit-2
      1 year ago

      Does rancher connect the pcs together? I have like 3 mini pcs sitting around, and I’ve always wanted to kinda combine them somehow

      Like being able to combine cpu power or something. Idk if this is possible without getting a mobo with multiple cpu slots, but if it is. I’d love to learn!

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

        Yeah, Kubernetes is designed to run in a cluster so you can pool processing power and memory from multiple devices. I banged my head against the wall for hours trying to figure out how to set up a cluster by hand, but then discovered if you install Rancher in a regular docker container it can handle all that for you

        • Osnapitsjoey@lemmy.one
          link
          fedilink
          English
          arrow-up
          2
          ·
          1 year ago

          No shit. So you’re saying I can hook up like three mini pcs and make a mega at home server!? I gotta look into this. Did you follow a guide or anything you think is good enough or is as easy as a Google?

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

            My recommendation is to look into k3sup and Rancher. I had a lot of trouble trying to install rancher in a docker container and migrating to a cluster after, and k3sup makes it really easy to set up a k3s cluster without having to configure everything manually

            You can accomplish the same task with docker swarm, but I figured it would be better to learn something that wasn’t abandonware

            I haven’t dug into the storage side yet since I have a separate NAS, but it will probably be beneficial to set up something like Ceph, GlusterFS, or Longhorn if you don’t have one

            • Osnapitsjoey@lemmy.one
              link
              fedilink
              English
              arrow-up
              1
              ·
              1 year ago

              Oh I just realized this is for kubernates. Unraid is all dockers. Can a docker swarm also pool resources?

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

                Yep, similar concept. Not sure how well unraid will handle the swarm behavior but I can imagine there’s someone out there who has tried it before

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    1
    arrow-down
    1
    ·
    edit-2
    1 year ago

    Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

    Fewer Letters More Letters
    DNS Domain Name Service/System
    Git Popular version control system, primarily for code
    HA Home Assistant automation software
    ~ High Availability
    HTTP Hypertext Transfer Protocol, the Web
    LXC Linux Containers
    NAS Network-Attached Storage
    SSD Solid State Drive mass storage
    SSH Secure Shell for remote terminal access
    VPN Virtual Private Network
    VPS Virtual Private Server (opposed to shared hosting)
    k8s Kubernetes container management package
    nginx Popular HTTP server

    11 acronyms in this thread; the most compressed thread commented on today has 11 acronyms.

    [Thread #82 for this sub, first seen 26th Aug 2023, 23:55] [FAQ] [Full list] [Contact] [Source code]

  • thekernel@kbin.social
    link
    fedilink
    arrow-up
    0
    arrow-down
    1
    ·
    1 year ago

    I like the concept, but hate the configuration schema and tooling which is all needlessly obtuse (eg. helm)