homelab/k3s/storage/nas-pv.yaml
Samantha Atkins 759ef949bc K3s cluster on Proxmox with WireGuard mesh networking
Replaced Headscale (too buggy in 0.28.x — random node drops) with direct
WireGuard hub-and-spoke + full mesh. 7 Proxmox VMs across 3 hosts form a
K3s v1.34.6 cluster: 3 control-plane/etcd nodes, 4 workers.

Running services: postgres, mariadb, ghost (x3), forgejo, authentik.
All unpinned services use local-path StorageClass. Databases pinned to
pve-worker and adder-worker with local PVs.

Includes VM provisioning scripts (create-debian-template.sh, clone-vm.sh),
K3s manifests for all services, and full deployment docs in k3s/README.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 01:23:13 -04:00

47 lines
1.1 KiB
YAML

# NAS PersistentVolume — Synology 425+ at 192.168.40.96
# NFS share mounted cluster-wide — any pod can claim storage from it via PVC
# ReadWriteMany — multiple pods on different nodes can mount simultaneously
#
# Prerequisites on every K3s worker VM:
# apt install nfs-common
#
# Deploy (once, cluster-scoped — no namespace):
# kubectl apply -f nas-pv.yaml
#
# Then any service can claim NAS storage with a PVC like:
# storageClassName: nas-nfs
# accessModes: [ReadWriteMany]
#
# Replace /volume1/k3s with your actual NAS share path.
# Create subdirectories on the NAS per service to keep data organised:
# /volume1/k3s/monerod
# /volume1/k3s/vaultwarden
# etc.
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: nas-pv
spec:
capacity:
storage: 40Ti
accessModes:
- ReadWriteMany
persistentVolumeReclaimPolicy: Retain
storageClassName: nas-nfs
mountOptions:
- hard
- nfsvers=4.1
nfs:
server: 192.168.40.96
path: /volume1/k3s
---
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: nas-nfs
provisioner: kubernetes.io/no-provisioner
volumeBindingMode: Immediate
reclaimPolicy: Retain