From 716489eafd8d46645884f4d682d5cc439429602c Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Tue, 16 Jun 2026 18:34:39 -0700 Subject: [PATCH] Deployment to Kubernetes: document DaemonSet + hostPath volume servers --- Deployment-to-Kubernetes-and-Minikube.md | 42 ++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/Deployment-to-Kubernetes-and-Minikube.md b/Deployment-to-Kubernetes-and-Minikube.md index 8ce1a85..314744d 100644 --- a/Deployment-to-Kubernetes-and-Minikube.md +++ b/Deployment-to-Kubernetes-and-Minikube.md @@ -58,6 +58,48 @@ spec: For more details, see the [IAM Support](https://github.com/seaweedfs/seaweedfs-operator/blob/master/IAM_SUPPORT.md) documentation in the operator repository. +## Bare-metal volume servers (DaemonSet + node-local disks) + +By default the Operator runs volume servers as a `StatefulSet` backed by +dynamically-provisioned `PersistentVolumeClaim`s. On bare-metal / on-prem +clusters you often instead want **one volume server per node, writing directly +to that node's physical disks**. Set `volume.kind: DaemonSet` and list the +node-local directories in `volume.hostPath`: + +```yaml +apiVersion: seaweed.seaweedfs.com/v1 +kind: Seaweed +metadata: + name: seaweed1 +spec: + image: chrislusf/seaweedfs:latest + master: + replicas: 3 + volume: + kind: DaemonSet # one volume server per matching node (replicas is ignored) + hostPath: # node-local data dirs, one per physical disk + - path: /mnt/disks/ssd0 + maxVolumeCount: 100 + - path: /mnt/disks/ssd1 + nodeSelector: # restrict to labelled storage nodes + seaweedfs.com/storage: "true" + tolerations: + - key: seaweedfs.com/storage + operator: Exists + effect: NoSchedule + filer: + replicas: 1 +``` + +Each `hostPath` entry is mounted at `/data` and passed to +`weed volume -dir`, so a single server can span several disks; the optional +`maxVolumeCount` caps volumes per directory. `hostPath` is required in +DaemonSet mode (DaemonSets cannot use `volumeClaimTemplates`), but it also +works with the default `StatefulSet` — pair it with node anti-affinity so two +replicas never share a host directory. For rack/datacenter-aware placement +across multiple volume groups, see +[Topology Support](https://github.com/seaweedfs/seaweedfs-operator/blob/master/TOPOLOGY_SUPPORT.md). + ## Declarative Buckets and IAM Besides provisioning the cluster itself, the Operator can manage S3 buckets,