Storage and Backup in Kubernetes! // Longhorn Tutorial

Поделиться
HTML-код
  • Опубликовано: 14 янв 2025

Комментарии • 84

  • @robfahey7363
    @robfahey7363 2 месяца назад +9

    K3s + Rancher + Longhorn is a great setup.
    I was able to make a test K3s cluster watching your videos and Jim's Garage.
    I have learned so much from your videos, they are so well done.

    • @christianlempa
      @christianlempa  2 месяца назад +1

      That is so nice! Thank you so much for the feedback :)

    • @Vk_iresh
      @Vk_iresh 14 дней назад

      hey bro i was working on NextCloud with k3s cluster, i want to create a persistent storage with Longhorn can u pls help with it?

    • @robfahey7363
      @robfahey7363 13 дней назад

      @@Vk_iresh Depending on where you are getting stuck I may be able to help.

  • @DavidVincentSSM
    @DavidVincentSSM 2 месяца назад +6

    excellent tutorial as always.. looking forward to the upcoming traefik and certmanager tutorial

    • @christianlempa
      @christianlempa  2 месяца назад +6

      Thank you so much! 😊 it’s almost done so I’m gonna expect it to publish next week

    • @dimovstanimir
      @dimovstanimir 2 месяца назад

      @@christianlempa I can't wait. ;)))

  • @mra2202
    @mra2202 2 месяца назад

    Really loved the video. I recently deployed longhorn in my cluster and this video made me realize how many mistakes I made. 😅

  • @dimovstanimir
    @dimovstanimir 6 часов назад

    I can't believe LongHorm creators made the restore procedure so hard!!! 😮😮😮

  • @mimicAuto
    @mimicAuto 2 месяца назад

    This is great! Thanks for taking the time to make such valuable and comprehensive content 👍

  • @R4GN4Rx64
    @R4GN4Rx64 Месяц назад

    Hey @Christian, love your videos, always super informative and entertaining!

    • @christianlempa
      @christianlempa  Месяц назад

      Thank you so much! Glad you enjoy them :)

  • @Mohamedmohamed2-i1t
    @Mohamedmohamed2-i1t 2 месяца назад

    Excellent tutorial, wonderful explanation as always

  • @dean.kannenberg
    @dean.kannenberg 2 месяца назад

    Great Video, especially for the backup / restore part and the example with a helm chart!

  • @imagineJH
    @imagineJH 2 месяца назад +2

    I would be interested in a video about using Velero for backups in combination with Longhorn!
    Great vid :)

    • @christianlempa
      @christianlempa  2 месяца назад

      Thanks! Never heard of it, but I will check it out ;)

  • @studioxxswe
    @studioxxswe Месяц назад +1

    Excellent video, now I know better how Longhorn works.
    K8 is so complicated and over engineered that I think my vSphere install is 100 times easier to work with even with vSAN and NSX :)

    • @christianlempa
      @christianlempa  Месяц назад +1

      Absolutely! :D But it's fascinating to learn, and once you get through the painful beginning, you start to appreciate the benefits! Thank you so much for the feedback!

  • @LampJustin
    @LampJustin 2 месяца назад +5

    Hey Christian,
    since I've had many problems with longhorn, mainly perfomance and kubernetes upgrade (evicting volumes to other nodes) related, I found the drbd operator called piraeus. In my opinion it is vastly superior and makes use of proven tech like drbd for replication and either lvm or zfs for the backend storage. I hope you can give it a try and maybe compare the two. Piraeus could really use more attention as it is pretty easy to use as well and much faster.

    • @burads
      @burads 2 месяца назад +1

      Really love the idea of Longhorn as it's so easy to setup. But for me i ran into quota issues. That the volumes were out of space even though they were not. Apprantly when working with WAL files like prometheus uses the Used diskspace on disk and in longhorn differs by quite a lot due to the "Cleanup" Not replicating to the disk usage in longhorn. Which for me was a 2 GB metrics file that took up a 50GB Longhorn PV. and Prometheus crashed due to "Not enough diskspace.
      Now using Rook-Ceph for that reason.

    • @LampJustin
      @LampJustin 2 месяца назад

      @burads yeah I've had a number of other issues as well that I did not mention. Like problems with volume replication lagging behind and replicas failing at times. Also on bigger volumes draining nodes is nearly impossible and takes ages and resyncing failed replicas always resulted in the full volume having to be copied again, which is really annoying.

    • @LampJustin
      @LampJustin 2 месяца назад

      But maybe they fixed a couple of those issues. Though performance is always going to be bad because of the architecture

  • @hvogeler
    @hvogeler Месяц назад

    Hi Christian, I just (force-) uninstalled Longhorn from my cluster. It consumes way too much CPU resources heating my office which is kind of nice for the season. But honestly: I only provisioned a single volume which was not actively used and my CPUs showed an astonishing workload.

    • @christianlempa
      @christianlempa  Месяц назад

      Longhorn requires a couple of system containers for all the functions to work which is kind of a big overhead ( even for just a single volume 😁) but it is great 👍

  • @L3st86
    @L3st86 2 месяца назад

    Using Longhorn in kubernetes since 4 years doing better in every release

  • @АртёмМашковцев-р9д
    @АртёмМашковцев-р9д Месяц назад

    You are the best ! Perfect guide ! One question about Longhorn: We have 5 nodes (1 manger, 4 worker). Our longhorn.storageClass.settings.replicasCount = 1. Start Postgres on node = 3. All is okay. In longhorn UI - volume-replica = node-2, node-3. Okay. How can we move replica from node-2 -> node-4 (For example) ?

    • @christianlempa
      @christianlempa  Месяц назад

      Thank you so much! Good question, I haven't done it myself, but from my understanding you can increase the number of replicas of that volume, so it gets replicated on node-4, and after that reduce the number again and delete it from node-2.

  • @stefb69
    @stefb69 2 месяца назад +1

    i like rook ceph, but longhorn seems nice too

    • @christianlempa
      @christianlempa  2 месяца назад

      Nice, maybe I'll check it out at some point.

  • @MrToup
    @MrToup Месяц назад +1

    I am super surprised that longhorn is running without any issue on raspberry PIs 🤔 In the past I get so many cluster issues due to low resources.

    • @christianlempa
      @christianlempa  Месяц назад +1

      Maybe that was because of a slower Rpi or disk? I'm using RPi5 with 8GB and an NVME Hat.

    • @MrToup
      @MrToup Месяц назад

      @@christianlempa Probably. Glad to hear this work well. I hope you will share if you start facing some issues with the cluster.

    • @christianlempa
      @christianlempa  Месяц назад

      @@MrToup Of course, I'll do! :)

  • @Alexander-tl8uw
    @Alexander-tl8uw 26 дней назад

    What's the terminal app your are using?

  • @HDSlimex
    @HDSlimex 2 месяца назад

    Hello Christian I was just wondering what is the terminal client that you are using? Thanks

    • @christianlempa
      @christianlempa  Месяц назад

      I'm using Warp, you also find a video on my channel about it :)

  • @wrkt98
    @wrkt98 2 месяца назад

    excellent tutoriial! keep up the good work :)
    May I ask what's the confguration of your shell environment ?

    • @christianlempa
      @christianlempa  2 месяца назад

      Thank you so much! There's a video about it: ruclips.net/video/NfggT5enF4o/видео.html

  • @vasiliyreznik1789
    @vasiliyreznik1789 Месяц назад

    So, in a Kubernetes cluster, is it possible to deploy a highly available PostgreSQL service with three instances using Longhorn for volume replication and without using database replication at the PostgreSQL level?
    Thanks a lot for the video!

    • @christianlempa
      @christianlempa  Месяц назад

      Yes it is possible. There’s even a Postgres provider that does all the complicated setup for you, but I haven’t tried it out yet

  • @stevenbell7634
    @stevenbell7634 25 дней назад

    Quick question, can't we just rerun the pod with 1 replica and then restore the new longhorn pvc with the existing backup? If possible wouldn't that be quicker?

  • @jmulaaclips6859
    @jmulaaclips6859 Месяц назад

    Great video! I have been using longhorn on my RKE2 cluster for a while. The main thing I am struggling to do is an entire cluster restore. When I do the cluster restore it creates new volumes before I can even restore the backups, so I end up having to stop the multiple services I have and do it like you showed in the video. This isn't difficult but in a DR scenario I am looking for speed and simplicity while minimizing places for human error. With restoring the etcd database, the PVC claim information should remain the same. Perhaps longhorn doesn't have a built in method for this. Any advice would be appreciated!

    • @christianlempa
      @christianlempa  Месяц назад

      Thank you so much! I haven't tested this yet, but that's something I have to look at at some point

  • @ivanmaglica264
    @ivanmaglica264 2 месяца назад

    Hey Christian, what does Longhorn use in backend for storage? Is it ISCSI, NFS, NBD, ... ? It seems like it creates three big files, one on each node, exposes it over ISCSI, creates three-way raid1 md device, creates filesystem on top of it and then mounts it on host that hosts the container.

    • @christianlempa
      @christianlempa  2 месяца назад +1

      Hey! Great question, from my understanding, it is leveraging its own built-in mechanisms rather than traditional protocols like iSCSI or NFS, but I'm not sure.

  • @MelroyvandenBerg
    @MelroyvandenBerg 2 месяца назад

    12:00 install add-on on Chrome or safari? You mean firefox or a firefox fork, right?

  • @WAMNZ
    @WAMNZ 2 месяца назад

    Do a tutorial about your terminal please.

    • @christianlempa
      @christianlempa  2 месяца назад

      There is: ruclips.net/video/NfggT5enF4o/видео.html

  • @MelroyvandenBerg
    @MelroyvandenBerg 2 месяца назад

    So what if you also have proxmox ceph and running kubernetes? I like to apply both best practices for HA and have some redundancy. What if you run K8s on top of Promox with ceph and longhorn..? Doesn't that sound very very redundant? What is your architecture advice here?

    • @MelroyvandenBerg
      @MelroyvandenBerg 2 месяца назад

      Also backup remotely. .. 321 backup rule

    • @christianlempa
      @christianlempa  2 месяца назад

      That's a good question, and honestly, I'm not sure what I would do here. I think it doesn't make much sense to replicate the volumes when the whole disk is replicated in Ceph. I need some time to think about it and play around with Ceph.

  • @igordasunddas3377
    @igordasunddas3377 2 месяца назад

    What if I have a single-node cluster? I'd like it to be as simple as can be, but have e.g. ZFS volumes or datasets be created in the ZFS storage on my Proxmox host.
    I am trying my luck with proxmox-csi-plugin, but I don't think I am happy with it...

    • @christianlempa
      @christianlempa  2 месяца назад

      Hm good question, I'm not sure if it works great for a single node cluster, it's recommended anyway to run a minimum of 3 nodes in Kubernetes.

  • @---tr9qg
    @---tr9qg Месяц назад

    Linstor vs DRBD from Linbit is also very powerful open source storage solution for not only kubernetes clusters.

  • @ivantomica
    @ivantomica 2 месяца назад

    Used Longhorn quite a bit in a homelab, and had/have nothing but a problems with it, in any scenario that involves more than few GB of data. Too lazy to switch to something like OpenEBS, CEPH, DirectPV or Piraeus at the moment though 🙂 Basically, anything usable rather than Longhorn.

    • @christianlempa
      @christianlempa  2 месяца назад

      Maybe the network connection and the disks are not fast enough to replicate that amount of data.

    • @ivantomica
      @ivantomica 2 месяца назад

      @@christianlempa it could be, but the fact remains that it handles those situations poorly. Perhaps also my lack of in-depth knowledge about the system plays a role. Never the less, both their docs, and their resilience could be better 😀

    • @christianlempa
      @christianlempa  2 месяца назад

      @@ivantomica I highly agree, they don't say much about the architecture details, how they do replication, etc.

  • @Metalyga
    @Metalyga 14 дней назад

    What happens if cluster got nuked?

    • @christianlempa
      @christianlempa  12 дней назад

      You can create a longhorn system backup, maybe that's what you need: longhorn.io/docs/1.7.2/advanced-resources/system-backup-restore/backup-longhorn-system/

  • @raine-works
    @raine-works 2 месяца назад

    Gigabytes ✖
    G B bites ✔

  • @brockhard
    @brockhard 2 месяца назад

    How do you delete longhorn when it's stuck deleting lol

    • @christianlempa
      @christianlempa  2 месяца назад +1

      It depends on which resources are stuck, maybe let's follow up on Discord ;)

  • @senpaisylnsr5253
    @senpaisylnsr5253 Месяц назад

    Longhorn requires installation of components in the nodes. This makes Longhorn a complete non starter for me.

  • @SeanBotha
    @SeanBotha 2 месяца назад +4

    Isn't longhorn windows vista? Is this name even legal?

    • @christianlempa
      @christianlempa  2 месяца назад +1

      I don’t think it’s a tm :D

    • @FredrikRambris
      @FredrikRambris 2 месяца назад +2

      No, it is this big bovine creature. 😅

    • @hugodsa89
      @hugodsa89 2 месяца назад

      @@FredrikRambrisunderrated reply 🤣

  • @987we3
    @987we3 2 месяца назад +5

    Docker still better

    • @JokingChickenn
      @JokingChickenn 2 месяца назад +11

      For easy home setups. Yes
      For fun and/or HA setups. No
      Use whatever works for you tho

    • @guanche011
      @guanche011 2 месяца назад

      Under the hood its the same tech. K8s is a management layer on top for very large distributed apps, cool tech. But most businesses don't ever need it. Wait a few years until the videos come with the title "you probably don't need k8s" after the hype dies down (which is already happening). Edit; not to write off the tutorial christian, very thorough and well explained! If you think or want to work in mega scale services, this is valuable.

    • @thaddeuscleo5920
      @thaddeuscleo5920 2 месяца назад +1

      For small deployment yeah, wait until you need to manage multiple instances and manage system upgrades. Basic docker engine has limited capabilities