-
Notifications
You must be signed in to change notification settings - Fork 16
Expand file tree
/
Copy pathminimal-dev-tenant.yaml
More file actions
executable file
·92 lines (78 loc) · 2.85 KB
/
Copy pathminimal-dev-tenant.yaml
File metadata and controls
executable file
·92 lines (78 loc) · 2.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Minimal Development Tenant Example
#
# This is the smallest valid RustFS tenant configuration.
# Suitable for local development, testing, or learning.
#
# Resources created:
# - 1 StatefulSet with 1 replica
# - 1 PVC (1 server × 1 volume)
# - 3 Services (IO at 9000, Console at 9001, Headless)
# - 1 ServiceAccount with Kubernetes API token automount disabled
#
# Total storage: 10Gi (1 volume × 10Gi default)
apiVersion: rustfs.com/v1alpha1
kind: Tenant
metadata:
name: dev-minimal
namespace: default
labels:
environment: development
spec:
# Container image (optional - uses operator default if not specified)
image: rustfs/rustfs:1.0.0-beta.10
# Minimal pool configuration.
# A single-node single-disk Tenant is expressed as 1 server × 1 volume.
# Other storage layouts are passed through to RustFS for validation at startup.
pools:
- name: dev-pool
servers: 1 # Single server for development
persistence:
volumesPerServer: 1 # Single PVC; RustFS uses no erasure parity
# Optional: Reduce storage size for development
# volumeClaimTemplate:
# accessModes: ["ReadWriteOnce"]
# resources:
# requests:
# storage: 5Gi # Smaller for dev environments
# Optional: Enable debug logging for development
# Note: Operator automatically sets RUSTFS_VOLUMES, RUSTFS_ADDRESS,
# RUSTFS_CONSOLE_ADDRESS, and RUSTFS_CONSOLE_ENABLE
env:
# Standard Rust logging (not RustFS-specific)
- name: RUST_LOG
value: "debug"
---
# Quick Start Guide
# 1. Apply the tenant:
# kubectl apply -f minimal-dev-tenant.yaml
# 2. Check status:
# kubectl get tenant dev-minimal
# kubectl get pods -l rustfs.tenant=dev-minimal
# kubectl get pvc -l rustfs.tenant=dev-minimal
# 3. Wait for pod to be ready:
# kubectl wait --for=condition=ready pod -l rustfs.tenant=dev-minimal --timeout=300s
# 4. Access S3 API (port 9000):
# kubectl port-forward svc/dev-minimal-io 9000:9000
# # Test: aws --endpoint-url http://localhost:9000 s3 ls
# 5. Access Console UI (port 9001):
# kubectl port-forward svc/dev-minimal-console 9001:9001
# # Open http://localhost:9001 in browser
# # Default credentials: rustfsadmin / rustfsadmin
# 6. View automatically configured RUSTFS_VOLUMES:
# kubectl get statefulset dev-minimal-dev-pool \
# -o jsonpath='{.spec.template.spec.containers[0].env[?(@.name=="RUSTFS_VOLUMES")].value}'
#
# Output will be:
# /data/rustfs0
#
# This tells RustFS to use one local volume at:
# /data/rustfs0
# 7. Test with MinIO client:
# mc alias set devlocal http://localhost:9000 rustfsadmin rustfsadmin
# mc mb devlocal/test-bucket
# mc ls devlocal
# 8. View logs:
# kubectl logs -f -l rustfs.tenant=dev-minimal
# 9. Delete tenant and cleanup:
# kubectl delete tenant dev-minimal
# # All resources (StatefulSets, PVCs, Services, RBAC) are automatically deleted