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
    38
    arrow-down
    1
    ·
    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.

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

      The one exception to this is if you’re using your homelab to learn kubernetes.

      That was the only time I used K8s and k3s on my homelab.

      And for anything that I do want to set up in a HA/cattle kind of way, I use Docker Swarm, as it feels like a more comfortable extension of docker compose.

    • Lodra@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 year ago

      While you’re probably right overall, there are many good reasons to use k8s. The api provides all sorts of benefits. Kubectl, k9s, and other operational UIs . Good deployment models and tools like argo. Loads of helm charts that are (theoretically) ready to use.

      No, those things aren’t free. There’s a lot of overhead to running k8s.

      • andrew@lemmy.stuart.fun
        link
        fedilink
        English
        arrow-up
        3
        ·
        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.

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

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

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

        Oh it is not that much, I run adguard DNS with adblocking, searxng as my search engine, vaultwarden as my password manager. All combined with Argo CD as GitOps engine, nginx ingress with cert-manager for lets encrypt certificates, longhorn as storage layer and metallb as loadbalancer solution. I am planning to completely replace my current setup (which is an old sandy bridge powered HP microserver) with a turing pi 2 clusterboard with 4 RPi4 CMs as soon as they get cheaper.

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

      How did you write your templates? Did you use Kompose to translate from Docker compose files, or did you write them from scratch?

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

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

    I love kubernetes. At the start of the year I installed k3s von my VPS and moved over all my services. It was a great learning opportunity that also helped immensely for my job.

    It works just as well as my old docker compose setup, and I love how everything is contained in one place in the manifests. I don’t need to log in to the server and issue docker commands anymore (or write scripts / CI stages that do so for me).

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

      Are most of your services just a single pod? Or do you actually have them scaled? How do you then handle non-cloud-native software?

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    4
    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

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

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

    I run a 2 node k3s cluster. There are a few small advantages over docker swarm, built-in network policies to lock down my VPN/Torrent pod being the main one.

    Other than that writing kubernetes yaml files is a lot more verbose than docker-compose. Helm does make it bearable, though.

    Due to real-life my migration to the cluster is real slow, but the goal is to move all my services over.

    It’s not “better” than compose but I like it and it’s nice to have worked with it.

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

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

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

      Helm is one of the reasons I became interested in Kubernetes. I really like the idea of a package where all I have to do is provide my preferences in a values file. Before swarm was mature, I was managing my containers with complicated shell scripts to bring stuff up in the right order and it became fragile and unmaintainable.

  • dap@lemmy.onlylans.io
    link
    fedilink
    English
    arrow-up
    2
    ·
    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!

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

    Here’s a slightly different story: I run OpenBSD on 2 bare-metal machines in 2 different physical locations. I used k8s at work for a bit until I steered my career more towards programming. Having k8s knowledge handy doesn’t really help me so much now.

    On OpenBSD there is no Kubernetes. Because I’ve got just two hosts, I’ve managed them with plain SSH and the default init system for 5+ years without any problems.

  • orizuru@lemmy.sdf.org
    link
    fedilink
    English
    arrow-up
    2
    ·
    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?

    • egonallanon@lemm.ee
      link
      fedilink
      English
      arrow-up
      2
      ·
      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.

    • kelvie@lemmy.ca
      link
      fedilink
      English
      arrow-up
      2
      ·
      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
        4
        ·
        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.

  • russjr08@outpost.zeuslink.net
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    I feel like it took me quite a while to get the hang of Docker, and Kubernetes on a general look seems all that much more daunting! Hopefully one day I can break it down into smaller pieces so I can get started with it!

  • 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

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