94
VMs or containers? (lemmy.world)
submitted 1 year ago by rpn@lemmy.world to c/selfhosted@lemmy.world

I'm thinking about starting a self hosting setup, and my first thought was to install k8s (k3s probably) and containerise everything.

But I see most people on here seem to recommend virtualizing everything with proxmox.

What are the benefits of using VMs/proxmox over containers/k8s?

Or really I'm more interested in the reverse, are there reasons not to just run everything with k8s as the base layer? Since it's more relevant to my actual job, I'd lean towards ramping up on k8s unless there's a compelling reason not to.

you are viewing a single comment's thread
view the rest of the comments

Why not do both ? As I understand it, to do kubernetes clusters, you must have at least 3 hosts. They don’t need to be 3 different physical hosts: they could be VM (hosted on Proxmox).

Proxmox also having a very strong implementation of ZFS, then it could be used as the storage « host », and it gives you also the option to do snapshots of the VM (and the storage pool), as well as replication/etc.

[-] scottyjoe9@sh.itjust.works 5 points 1 year ago

A k8s cluster can run on a single host if that's what you want. I'm not sure if it would be worth the virtualisation cost to run it on VMs in the middle as well. If you were only ever going to run on a single host I probably wouldn't use k8s though, I would just run containers. 🤷‍♂️

[-] redcalcium@c.calciumlabs.com 1 points 1 year ago* (last edited 1 year ago)

You only need 3 host if you want to load-balance etcd, which I think totally unnecessary for selfhosting purpose. Some downtime when updating kubernetes is acceptable in selfhosted environment for personal purpose.

[-] aksdb@feddit.de 1 points 1 year ago

They don’t need to be 3 different physical hosts: they could be VM (hosted on Proxmox).

That is fine for training purposes, but not for real hosting. You typically don't guard against software crashes, but against hardware failures/outages. And this it not given with all three nodes on the same physical system.

In that case you can simply skip the HA setup and go with a single node. Or not use k8s at all and just manage containers using ansible and systemd or whatever.

this post was submitted on 04 Jul 2023
94 points (100.0% liked)

Selfhosted

40383 readers
290 users here now

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:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. 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.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS