Is it going against best practice to install Ranch...
# harvester
j
Is it going against best practice to install Rancher on a single-node Harvester VM k8s cluster? I notice it says not to use Docker Rancher installation in production, so my concern is that installing Rancher on a single Harvester node but over multiple VMs would have the same potential single-node/single point of failure drawbacks as the Docker installation. However, this section states that Rancher can be installed on 3 rke2 nodes which can be virtual, but I wonder if that includes VMs on a single machine. Are the limitations and concerns around the Docker Rancher installation removed using 3 VMs to address watcher and etcd replication concerns or is it about the single-node failure?
h
Honestly, one VM is Ok, the Docker option is for supportability of upgrades. With one host and one VM you can’t expect HA so 🤷
You can also use the vcluster AddOn too. It’s in the docs
b
or is it about the single-node failure?
☝️ It's about the single node failure.
There's no real limitation other than "what happens if when..."
h
Do not use the docker way. Install k3s on a VM and then rancher following the docs.
2
☝️ 1
b
Docker is just just for a quick test instance.
j
Gotcha, so I dropped a huge background on what I'm trying to achieve and why. TLDR, I initially want a simpler bootstrapping experience to manage some clusters for homelabs where resources may be limited for some. Would it be fair to state if starting out, you can use a single-node VM k3s getting started but the ideal state is to eventually move to HA installations?
b
Sorry limitation was in regards to setting up different nodes and whatnot.
If you have harvester, the vcluster thing is probably what you want.
Or just make a VM and do the k3s install
j
cool. I am just trying to think of basic progressions depending on different homelab nodes folks might have lying around
👍 1
h
Yes, but we may move away from that vcluster AddOn and there might not be an upgrade path since it was never supported.
p
minipc w/ 6-8 cores, 2x nvme/ssd + 64GB RAM is enough to run single node harvester
👍 2
j
I think having a single-node harvester is a decent analog to what most of the homelab communities today use which is a single trunas/openmediavault/proxmox node and then slowly move them towards HA and bare metal scaling along with others
minipc w/ 6-8 cores, 2x nvme/ssd + 64GB RAM is enough to run single node harvester
Yeah absolutely, This is where I want to draw up documentation and even though my current starter server is quite beefy for what Harvester needs, it's just what I had 🙂
My next goal is to play around with building out some bare metal installations and have Rancher manage a bunch of them.
So no vcluster, yes single-node k3s rancher for starters and I guess if the goal is to get folks to move their Rancher to an HA instance at some point I would follow this Migration guide after bootstrapping the k8s cluster on a multi-node Harvester installation?
h
Yes and no, they don’t need to migrate the config. They’d just add more VMs with k3s and join that cluster. If they do vcluster, which works very well and easy, they can do that migration from vcluster to an eventual k3k replacement AddOn.
Easy+”supported”= vm+k3s
j
thanks @happy-cat-90847!
🙌 2
Sorry all, I dropped this for a minute due to life happening. I came back to read this with fresh eyes, and I am curious about another lazy install path. There's a caution message that states
Do not install Rancher with Docker in production. Otherwise, your environment may be damaged, and your cluster may not be able to be recovered. Installing Rancher in Docker should only be used for quick evaluation and testing purposes.
As @happy-cat-90847 mentioned:
Honestly, one VM is Ok, trancherhe Docker option is for supportability of upgrades. With one host and one VM you can’t expect HA so 🤷
Do not use the docker way. Install k3s on a VM and then rancher following the docs.
I am a bit new to setting up my own kubernetes environments as I've always just used a managed kubernetes setup. I am hoping to have a quick button install way to bootstrap Rancher the production HA way. As a reminder, I have Harvester installed on a single beefy node. I want to install Rancher and use it to create and manage VMs on Harvester. So... Would this install recipe work? 1. Install Rancher via Docker on my local laptop 2. Add Harvester to my laptop Docker Rancher via
cluster-registration-url
setting on Harvester 3. Have laptop Docker Rancher deploy a k3s/rke2 cluster called
rancher-prod
on Harvester VMs 4. Install Harvester on
rancher-prod
5. Add Harvester to
rancher-prod
via
cluster-registration-url
setting on Harvester I'm trying this out right now anyways and I'm stuck at step 3 above. Harvester has created the VMs, but my local Rancher is saying
waiting for viable init node
and With each node status
Waiting for Node Ref
Copy code
Creating server [fleet-default/rancher-rancher-nldq9-2cgdn] of kind (HarvesterMachine) for machine rancher-rancher-nldq9-2cgdn in infrastructure provider
So it seems like the control plane maybe wasn't created, but I'm not sure. Two questions I'll leave. 1. Do I have to go in an manually provision these nodes or should I be using a particular image for these VMs? 2. Would this install method not work for any reason? I'm particularly concerned about the handoff between my Docker Rancher and my intended production Rancher, and hosting Rancher on the Harvester node that it is using to generate clusters. Thanks!
t
Why just spin up a VM from the Harvester GUI and add k3s in it? Keep in mind doing it this way means that if the node goes down, IT ALL goes down. If you want HA you need a few more devices. You are stuck on step 3 probably because you are not using a proper certificate for Rancher. I think you steps are a lot of extra work for little benefit. I have migrated a customer from Rancher on Docker and NEVER recommend deploying that way. In theory you can with a Rancher Backup and Restore. But it is a TON of steps : https://gist.github.com/clemenko/506e01743bee6d722b0c302aa5091ce0
💡 1
Do you plan on adding more nodes? If no then run the rancher vcluster addon directly into Harvester. https://docs.harvesterhci.io/v1.6/advanced/addons/rancher-vcluster If you are adding more nodes. then go the VM/k3s way for deploying Rancher.
j
https://rancher-users.slack.com/archives/C01GKHKAG0K/p1761169370125389?thread_ts=1761167814.475579&cid=C01GKHKAG0K Any concerns around using vcluster given it may not be supported? Or is the community around it well supported that you'd trust using it for now?
Do you plan on adding more nodes?
That said, this will likely be the case so I should just go with VM/k3s nodes
t
sounds about right.
j
do you have a go-to image to use for this or do you use scripts, or just raw dog it?
t
I like Rocky. but Ubuntu works well too. I have a oneliner for Rocky and RKE2 if you want.
j
yes please 🙂
t
this for rocky 10. it also installs helm
Copy code
dnf install kernel-modules-extra-$(uname -r) -y ; modprobe ip_tables && curl -sfL <https://get.rke2.io> | INSTALL_RKE2_CHANNEL=stable sh - && systemctl enable --now rke2-server.service && echo "export KUBECONFIG=/etc/rancher/rke2/rke2.yaml PATH=$PATH:/usr/local/bin/:/var/lib/rancher/rke2/bin/" >> ~/.bashrc && source ~/.bashrc && curl -s <https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3> | bash
j
slick...I will now spend days studying this one line 🙂
t
lol
j
thanks for talking me off the ledge, I just need to force myself through the install but I ran into some issues with cert generation
then life stuff
t
no worries. life stuff always takes priority.
246 Views