When upgrading (k3s) Kubernetes Nodes using Ansible to drain the nodes, the following error appears:
error when evicting pods/"instance-manager-xxxx" -n "longhorn" (will retry after 5s): Cannot evict pod as it would violate the pod's disruption budget.
I am using the CNPG-Operator to provision a few Postgres-Clusters in Kubernetes for my applications. These use Longhorn as a single-replica storage backend.
More than one replicas would be pointless, since postgres itself manages data replication.
Since longhorn will not allow single-replica PVs to be evicted when a node is drained by default, we need to change that behaviour for node upgrades.