To run Longhorn storage only on the specific nodes:
- Download specific version yaml from:
https://raw.githubusercontent.com/longhorn/longhorn/v1.x.x/deploy/longhorn.yaml
- Append new data to longhorn-default-setting ConfigMap
# Source: longhorn/templates/default-setting.yaml
apiVersion: v1
kind: ConfigMap
metadata:
data:
default-setting.yaml: |-
create-default-disk-labeled-nodes: "true"
- Apply yaml
- Add label node.longhorn.io/create-default-disk=true to your dedicated storage nodes. Do nothing on another node.
kubectl patch nodes xxxx -p '{"metadata":{"labels":{"node.longhorn.io/create-default-disk":"true"}}}'
- Done
For better result, you may apply taint to Longhorn nodes
That’s all