Overview
This guide covers production deployment of S2 Lite using Kubernetes and Helm, including TLS, monitoring, high availability considerations, and security best practices.Prerequisites
- Kubernetes cluster (1.19+)
- Helm 3.0+
- kubectl configured
- S3-compatible object storage bucket
- (Optional) Prometheus Operator for metrics
Quick Start
Install from Helm Repository
Add the S2 Helm repository
Install with default settings (in-memory)
Install with S3 storage (production)
Install from OCI Registry (GitHub Container Registry)
Production Configuration
Complete values.yaml Example
Create avalues.yaml file for your production deployment:
TLS Configuration
Option 1: Self-Signed Certificate (Testing)
Option 2: Provided Certificate (Production)
Create TLS secret
Configure Helm values
Deploy
Option 3: cert-manager Integration
Install cert-manager
Create ClusterIssuer
Create Certificate
Cloud Provider Examples
AWS EKS with IRSA
Create IAM policy
Create IAM role with OIDC
Deploy with IRSA annotations
GCP GKE with Workload Identity
Create GCP service account
Grant GCS permissions
Bind Kubernetes SA to GCP SA
Deploy with Workload Identity
Azure AKS with Managed Identity
Create managed identity
Grant storage permissions
Deploy with pod identity
Monitoring & Observability
Prometheus Integration
With Prometheus Operator installed:Key Metrics to Monitor
s2_lite_append_duration_seconds- Append latency histograms2_lite_read_duration_seconds- Read latency histograms2_lite_active_streams- Number of active streamss2_lite_active_sessions- Number of active client sessionsslatedb_*- SlateDB internal metrics
Grafana Dashboard
Query the/metrics endpoint to build dashboards:
High Availability Considerations
Current Architecture
- Single Active Instance: Only one S2 Lite pod can be active at a time
- Recreate Strategy: Old pod terminates before new pod starts
- Fencing: On startup, S2 Lite waits one manifest poll interval to ensure previous instance is fenced
Achieving High Availability
-
Fast Recovery: Minimize downtime during pod restarts
- Multi-Region Deployments: Run separate S2 Lite instances in different regions with different buckets
- Client-Side Retry: Configure SDKs with retry logic and failover
Planned Multi-Node Support
Future versions may support horizontal scaling. Track progress:- GitHub Issue #XX (hypothetical)
Resource Initialization
Declarative Basin/Stream Creation
Create basins and streams automatically on startup:Create init spec file
Create ConfigMap
Mount in Helm values
Security Best Practices
Pod Security
The default Helm chart includes security hardening:Network Policies
Restrict network access:CORS Configuration
Disable permissive CORS in production:--no-cors flag.
Upgrading
Check release notes
Update Helm repository
Upgrade release
Verify deployment
Pinning Versions
Pin to specific chart and app versions in production:Troubleshooting
Check Logs
Common Issues
Pod stuck in Pending
Pod stuck in Pending
- Insufficient resources
- Node selector mismatch
- Missing service account
Pod crash loops
Pod crash loops
- Bucket exists
- IAM role has correct permissions
- Endpoint URL is correct
Health check failures
Health check failures