rustfs

by ScriptonBasestar

Helm chartv0.3.0App 1.0.0-alpha.66BSD-3-Clause

High-performance S3-compatible object storage built with Rust, supporting migration and coexistence with MinIO/Ceph

About this chart

RustFS Helm Chart

High-performance S3-compatible object storage built with Rust. This Helm chart deploys RustFS on Kubernetes with production-ready features including high availability, tiered storage, and comprehensive monitoring.

Features

  • 🚀 High Performance: 2.3x faster than MinIO for 4K small files
  • 🔄 S3 Compatible: Full AWS S3 API compatibility
  • 🏗️ Tiered Storage: Mix SSD (hot) and HDD (cold) storage tiers
  • 📊 Production Ready: NetworkPolicy, PodDisruptionBudget, ServiceMonitor
  • 🔐 Secure: RBAC, secret management, security contexts
  • 🎯 Optimized Configs: Separate configs for home servers and startups
  • 📈 Scalable: Horizontal pod autoscaling support
  • 🛠️ Operational: Comprehensive Makefile for day-2 operations

Prerequisites

Deployment Scenarios

This chart includes three pre-configured deployment scenarios optimized for different use cases:

Home Server (values-home-single.yaml)

Minimal resources for personal servers, home labs, Raspberry Pi, or Intel NUC:

helm install rustfs-home charts/rustfs \
  -f charts/rustfs/values-home-single.yaml

Resource allocation: 100-500m CPU, 256-512Mi RAM, 10Gi storage

Startup Environment (values-startup-single.yaml)

Balanced configuration for small teams, startups, and development environments:

helm install rustfs-startup charts/rustfs \
  -f charts/rustfs/values-startup-single.yaml

Resource allocation: 250m-1000m CPU, 512Mi-1Gi RAM, 50Gi storage

Production HA (values-prod-master-replica.yaml)

High availability S3-compatible object storage with clustering:

helm install rustfs-prod charts/rustfs \
  -f charts/rustfs/values-prod-master-replica.yaml

Features: 4 replicas, StatefulSet clustering, pod anti-affinity, PodDisruptionBudget, ServiceMonitor

Resource allocation: 500m-2000m CPU, 1-2Gi RAM, 100Gi storage per pod

For detailed comparison and configuration examples, see the Scenario Values Guide.

  • Kubernetes 1.23+
  • Helm 3.8+
  • PersistentVolume provisioner (for persistent storage)
  • Ingress controller (optional, for HTTP/HTTPS access)
  • Prometheus Operator (optional, for monitoring)

Application License

Chart License: BSD-3-Clause (this repository) Application License: Apache-2.0 (RustFS)

Quick Start

Installation

# Add the Helm repository
helm repo add scripton-charts https://scriptonbasestar-container.github.io/sb-helm-charts
helm repo update

# Install RustFS with default configuration
helm install rustfs scripton-charts/rustfs \
  --namespace rustfs \
  --create-namespace \
  --set rustfs.rootPassword="your-secure-password"

# Or install from source
helm install rustfs ./charts/rustfs \
  --namespace rustfs \
  --create-namespace \
  --set rustfs.rootPassword="your-secure-password"

Access RustFS

# Port forward to access locally
kubectl port-forward -n rustfs svc/rustfs 9000:9000  # S3 API
kubectl port-forward -n rustfs svc/rustfs 9001:9001  # Web Console

# Get credentials
kubectl get secret rustfs-secret -n rustfs -o jsonpath='{.data.root-user}' | base64 -d
kubectl get secret rustfs-secret -n rustfs -o jsonpath='{.data.root-password}' | base64 -d

# Access Web Console
open http://localhost:9001

Configuration Variants

This chart includes four pre-configured values files for different use cases:

1. Default Configuration (values.yaml)

General-purpose configuration with balanced settings.

helm install rustfs ./charts/rustfs --namespace rustfs --create-namespace

Key Settings:

  • Single replica (no HA)
  • 100Gi per data directory (4 directories = 400Gi total)
  • 2 CPU cores, 4Gi RAM
  • ClusterIP service
  • No ingress

2. Production Configuration (values-example.yaml)

Production-ready configuration with HA and tiered storage for medium-scale deployments (100-1000 users).

helm install rustfs ./charts/rustfs \
  -f ./charts/rustfs/values-example.yaml \
  --namespace rustfs \
  --create-namespace \
  --set rustfs.rootPassword="your-secure-password"

Key Features:

  • ✅ High availability (3-node cluster)
  • ✅ Tiered storage (SSD + HDD)
  • ✅ Autoscaling enabled (3-8 replicas)
  • ✅ Prometheus metrics integration
  • ✅ Network policies for security
  • ✅ Pod disruption budget
  • ✅ Anti-affinity rules for multi-zone deployment

Best For:

  • Production workloads
  • Multi-zone Kubernetes clusters
  • Medium-scale object storage needs
  • Cost-optimized tiered storage

3. Home Server / NAS Configuration (values-homeserver.yaml)

Optimized for home servers, Raspberry Pi, Intel NUC, Synology NAS, etc.

helm install rustfs ./charts/rustfs \
  -f ./charts/rustfs/values-homeserver.yaml \
  --namespace rustfs \
  --create-namespace \
  --set rustfs.rootPassword="your-password"

Key Features:

  • ✅ Reduced resource usage (1 CPU, 2Gi RAM)
  • ✅ HDD storage optimization
  • ✅ Single replica (no HA overhead)
  • ✅ Minimal monitoring
  • ✅ Internal network only
  • ✅ 2 data directories (200Gi total)
  • ✅ Permission fix init container for NAS/NFS

Best For:

  • Personal NAS storage
  • Home lab experiments
  • Development environments
  • Single-node Kubernetes (k3s, MicroK8s)

4. Startup / Enterprise Configuration (values-startup.yaml)

Enterprise-grade configuration for 10K+ users.

helm install rustfs ./charts/rustfs \
  -f ./charts/rustfs/values-startup.yaml \
  --namespace rustfs \
  --create-namespace \
  --set rustfs.rootPassword="your-secure-password" \
  --set ingress.api.hosts[0].host="s3.yourdomain.com" \
  --set ingress.console.hosts[0].host="console.s3.yourdomain.com"

Key Features:

  • ✅ High availability (4 replicas)
  • ✅ Tiered storage (SSD hot + HDD cold)
  • ✅ Autoscaling (4-10 replicas)
  • ✅ PodDisruptionBudget (75% availability)
  • ✅ NetworkPolicy (security)
  • ✅ ServiceMonitor (Prometheus)
  • ✅ LoadBalancer service
  • ✅ Ingress with TLS
  • ✅ 4 CPU cores, 8Gi RAM per pod
  • ✅ Total capacity: ~4.2Ti

Best For:

  • Production S3 replacement
  • Startup/SMB storage infrastructure
  • Multi-tenant environments
  • High-availability requirements

Storage Configuration

Single Storage Class

Use default or specify a single storage class:

persistence:
  enabled: true
  storageClass: "fast-ssd"  # or "hdd-storage", "" for default
  size: 100Gi
rustfs:
  dataDirs: 4  # Total: 400Gi per replica

Tiered Storage (Hot/Cold)

Mix SSD and HDD for cost optimization:

storageTiers:
  enabled: true
  hot:
    storageClass: "fast-ssd"
    size: 50Gi
    dataDirs: 2  # 100Gi hot tier per pod
  cold:
    storageClass: "standard-hdd"
    size: 500Gi
    dataDirs: 2  # 1Ti cold tier per pod

Use Cases:

  • Hot tier: Frequently accessed data, databases, active files
  • Cold tier: Backups, archives, logs, large media files

Common Configuration Examples

External Access via Ingress

ingress:
  enabled: true
  className: nginx
  annotations:
    cert-manager.io/cluster-issuer: letsencrypt-prod
    nginx.ingress.kubernetes.io/proxy-body-size: "0"
  api:
    enabled: true
    hosts:
      - host: s3.example.com
        paths:
          - path: /
            pathType: Prefix
    tls:
      - secretName: s3-tls
        hosts:
          - s3.example.com
  console:
    enabled: true
    hosts:
      - host: console.s3.example.com
        paths:
          - path: /
            pathType: Prefix
    tls:
      - secretName: console-tls
        hosts:
          - console.s3.example.com

High Availability Cluster

replicaCount: 4

podDisruptionBudget:
  enabled: true
  minAvailable: 3  # Keep 75% availability

affinity:
  podAntiAffinity:
    requiredDuringSchedulingIgnoredDuringExecution:
      - labelSelector:
          matchLabels:
            app.kubernetes.io/name: rustfs
        topologyKey: kubernetes.io/hostname

Monitoring with Prometheus

monitoring:
  enabled: true
  serviceMonitor:
    enabled: true
    interval: 30s
    labels:
      prometheus: kube-prometheus

Using Existing Secrets

rustfs:
  existingSecret: "my-rustfs-credentials"
  rootUserKey: "username"
  rootPasswordKey: "password"

Operational Commands

This chart includes a comprehensive Makefile for day-2 operations:

# Get credentials
make -f make/ops/rustfs.mk rustfs-get-credentials

# Port forward services
make -f make/ops/rustfs.mk rustfs-port-forward-api      # S3 API on localhost:9000
make -f make/ops/rustfs.mk rustfs-port-forward-console  # Console on localhost:9001

# Test S3 API (requires MinIO Client 'mc')
make -f make/ops/rustfs.mk rustfs-test-s3

# View logs and shell
make -f make/ops/rustfs.mk rustfs-logs
make -f make/ops/rustfs.mk rustfs-shell

# Health and metrics
make -f make/ops/rustfs.mk rustfs-health
make -f make/ops/rustfs.mk rustfs-metrics

# Scale cluster
make -f make/ops/rustfs.mk rustfs-scale REPLICAS=6

# Backup (requires VolumeSnapshot CRD)
make -f make/ops/rustfs.mk rustfs-backup

# View all resources
make -f make/ops/rustfs.mk rustfs-all

# Full help
make -f make/ops/rustfs.mk help

S3 API Usage

AWS CLI

# Configure AWS CLI
aws configure --profile rustfs
# AWS Access Key ID: <root-user>
# AWS Secret Access Key: <root-password>
# Default region name: us-east-1
# Default output format: json

# Create bucket
aws --profile rustfs --endpoint-url http://localhost:9000 s3 mb s3://mybucket

# Upload file
aws --profile rustfs --endpoint-url http://localhost:9000 s3 cp myfile.txt s3://mybucket/

# List buckets
aws --profile rustfs --endpoint-url http://localhost:9000 s3 ls

MinIO Client (mc)

# Add alias
mc alias set myrustfs http://localhost:9000 <root-user> <root-password>

# Create bucket
mc mb myrustfs/mybucket

# Upload file
mc cp myfile.txt myrustfs/mybucket/

# List objects
mc ls myrustfs/mybucket

Python (boto3)

import boto3

s3 = boto3.client(
    's3',
    endpoint_url='http://localhost:9000',
    aws_access_key_id='<root-user>',
    aws_secret_access_key='<root-password>',
    region_name='us-east-1'
)

# Create bucket
s3.create_bucket(Bucket='mybucket')

# Upload file
s3.upload_file('myfile.txt', 'mybucket', 'myfile.txt')

# List buckets
response = s3.list_buckets()
print([bucket['Name'] for bucket in response['Buckets']])

Configuration Parameters

RustFS Configuration

ParameterDescriptionDefault
rustfs.rootUserAdmin usernamerustfsadmin
rustfs.rootPasswordAdmin password (required)""
rustfs.existingSecretUse existing Secret""
rustfs.regionS3 region nameus-east-1
rustfs.apiPortS3 API port9000
rustfs.consolePortWeb console port9001
rustfs.dataDirsNumber of data directories4

Persistence

ParameterDescriptionDefault
persistence.enabledEnable persistencetrue
persistence.storageClassStorage class""
persistence.sizeSize per data directory100Gi
persistence.accessModeAccess modeReadWriteOnce

Tiered Storage

ParameterDescriptionDefault
storageTiers.enabledEnable tiered storagefalse
storageTiers.hot.storageClassHot tier storage classssd-storage
storageTiers.hot.sizeHot tier size per dir50Gi
storageTiers.hot.dataDirsNumber of hot dirs2
storageTiers.cold.storageClassCold tier storage classhdd-storage
storageTiers.cold.sizeCold tier size per dir200Gi
storageTiers.cold.dataDirsNumber of cold dirs2

Clustering

ParameterDescriptionDefault
replicaCountNumber of replicas1
headlessService.enabledEnable headless servicetrue

Service

ParameterDescriptionDefault
service.typeService typeClusterIP
service.api.portAPI service port9000
service.console.portConsole service port9001

Ingress

ParameterDescriptionDefault
ingress.enabledEnable ingressfalse
ingress.classNameIngress classnginx
ingress.api.hostsAPI hostnames[]
ingress.console.hostsConsole hostnames[]

Resources

ParameterDescriptionDefault
resources.limits.cpuCPU limit2000m
resources.limits.memoryMemory limit4Gi
resources.requests.cpuCPU request500m
resources.requests.memoryMemory request1Gi

Production Features

ParameterDescriptionDefault
autoscaling.enabledEnable HPAfalse
autoscaling.minReplicasMin replicas1
autoscaling.maxReplicasMax replicas10
podDisruptionBudget.enabledEnable PDBfalse
networkPolicy.enabledEnable NetworkPolicyfalse
monitoring.serviceMonitor.enabledEnable ServiceMonitorfalse

Troubleshooting

Pods not starting

# Check pod status
kubectl get pods -n rustfs -l app.kubernetes.io/name=rustfs

# Check events
kubectl get events -n rustfs

Deploy rustfs with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has rustfs on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartrustfs is pinned at v0.3.0 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply