From e114f3e4d9628d559a8858f7a99d1f412cb4dbac Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Thu, 26 Feb 2026 14:42:08 -0800 Subject: [PATCH] docs: add SeaweedFS Operator section with IAM persistence example --- Deployment-to-Kubernetes-and-Minikube.md | 60 +++++++++++++++++++++++- 1 file changed, 59 insertions(+), 1 deletion(-) diff --git a/Deployment-to-Kubernetes-and-Minikube.md b/Deployment-to-Kubernetes-and-Minikube.md index 0e1416e..7c5bb8f 100644 --- a/Deployment-to-Kubernetes-and-Minikube.md +++ b/Deployment-to-Kubernetes-and-Minikube.md @@ -1,4 +1,62 @@ -This page explains how to deploy SeaweedFS to Kubernetes. While the [Introduction](#intro) and [Yaml Files](#yaml-files) sections describe manual deployment with static YAMLs (useful for learning), the recommended approach for production is using the **Helm Chart**. +This page explains how to deploy SeaweedFS to Kubernetes. While the [Introduction](#intro) and [Yaml Files](#yaml-files) sections describe manual deployment with static YAMLs (useful for learning), the recommended approaches for production are using the **Helm Chart** or the **SeaweedFS Operator**. + +# Recommended: SeaweedFS Operator + +The SeaweedFS Operator simplifies the deployment and management of SeaweedFS clusters on Kubernetes. + +## Installation + +```bash +helm repo add seaweedfs https://seaweedfs.github.io/seaweedfs/helm +helm install seaweedfs-operator seaweedfs/seaweedfs-operator +``` + +## IAM Configuration Example + +When using the Operator to enable S3 and IAM, you may want to ensure that IAM changes (like creating users or policies via the API) are persistent. This requires enabling filer persistence and ensuring write access is allowed. + +The following example shows a `Seaweed` custom resource configuration for IAM write access with persistence: + +```yaml +apiVersion: seaweed.seaweedfs.com/v1 +kind: Seaweed +metadata: + name: seaweed1 +spec: + image: chrislusf/seaweedfs:latest + volumeServerDiskCount: 1 + hostSuffix: seaweed.example.com + master: + replicas: 3 + volume: + replicas: 3 + requests: + storage: 2Gi + filer: + replicas: 2 + # Important: Enable persistence for the filer to store IAM metadata + persistence: + enabled: true + storageClassName: standard # Use your storage class + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 2Gi + # Important: Ensure IAM is enabled and write access is allowed + extraArgs: + - "-iam" + - "-s3.iam.readOnly=false" + s3: + enabled: true + iam: true + config: | + [leveldb2] + enabled = true + dir = "/data/filerldb2" +``` + +For more details, see the [IAM Support](https://github.com/seaweedfs/seaweedfs-operator/blob/master/IAM_SUPPORT.md) documentation in the operator repository. # Recommended: Helm Deployment