Hi I've got a few questions regarding upgrading my...
# longhorn-storage
h
Hi I've got a few questions regarding upgrading my k8s host nodes (ubuntu 22 -> 24) that run Longhorn: I have a StorageClass that uses longhorn that has only a single replica configured because replication is done in application-level (I have 3 instances of the app running with one volume per instance). Data locality for this StorageClass is set to strictly-local (it's a DB/need local storage). I need to drain the nodes one-by-one to upgrade them. I'm reading that longhorn will prevent the node drain if there's only a single replica left of a volume. I do not care losing that volume for the DB StorageClass, so it can be deleted if needed. The db operator I use will just auto-heal and create a new db replica on another node and rebuild from the the running instances. Are there any other considerations I should take into account before upgrading the nodes? My Kubernetes distro is k3s and im on version 1.30.2+k3s1. Is there a way to configure a StorageClass to allow draining the node even if there's only a single replica left? Is there some documentation about this? I could just use
kubectl drain <node-name> --ignore-daemonsets --delete-emptydir-data --force
but I'm not sure if that's the best way to go about it. I could also just cordon the node and do the os upgrade without draining it, but I'm not sure if that's a good idea either.