Operator Overview¶
What is Valkey Operator?¶
Valkey Operator is a production-grade Kubernetes operator that automates the deployment, management, and operation of Valkey instances in Kubernetes clusters. Valkey is a high-performance data structure server that serves as a drop-in replacement for Redis.
Key Features¶
Multi-Architecture Support¶
- Cluster Mode: Deploy and manage Valkey cluster instances with automatic sharding and replication
- Failover Mode: High-availability failover using Valkey Sentinel
- Replica Mode: Standalone or primary-replica architecture
- Standalone Sentinel: Deploy standalone sentinel instances for monitoring external Valkey deployments
Production-Ready Features¶
- High Availability: Automatic failover and recovery mechanisms
- Scaling: Online scale up/down operations without downtime
- Version Upgrades: Graceful rolling updates with minimal service disruption
- Persistent Storage: Configurable persistent volumes with retention policies
- Security: TLS encryption, ACL support, network policies
- Monitoring: Built-in Prometheus exporter integration
Kubernetes Native¶
- Custom Resource Definitions (CRDs): Native Kubernetes API integration
- Controller Pattern: Declarative configuration with continuous reconciliation
- RBAC Integration: Fine-grained permission control
- Service Discovery: Automatic service creation and management
- Resource Management: CPU/memory limits and requests
Architecture¶
Operator Components¶
┌─────────────────────────────────────────────────────────────┐
│ Kubernetes Cluster │
├─────────────────────────────────────────────────────────────┤
│ ┌─────────────────┐ ┌─────────────────┐ │
│ │ Valkey │ │ Valkey │ │
│ │ Operator │ │ Instances │ │
│ │ Controller │ │ │ │
│ │ │ │ ┌─────────────┐ │ │
│ │ ┌─────────────┐ │ │ │ Cluster │ │ │
│ │ │ Reconciler │ │ │ │ Failover │ │ │
│ │ │ Engine │ │◄──►│ │ Sentinel │ │ │
│ │ └─────────────┘ │ │ │ User │ │ │
│ │ │ │ └─────────────┘ │ │
│ └─────────────────┘ └─────────────────┘ │
└─────────────────────────────────────────────────────────────┘
Controller Responsibilities¶
- Resource Management: Creates and manages Kubernetes resources (StatefulSets, Services, ConfigMaps, Secrets)
- Configuration Synchronization: Ensures Valkey configurations match desired state
- Health Monitoring: Continuously monitors cluster health and triggers recovery actions
- Scaling Operations: Handles horizontal scaling of clusters and failover groups
- Version Management: Orchestrates rolling updates and version upgrades
Supported Valkey Versions¶
| Valkey Version | Kubernetes Versions | Status |
|---|---|---|
| 7.2.x | 1.33, 1.34, 1.35 | ✅ Stable |
| 8.0.x | 1.33, 1.34, 1.35 | ✅ Stable |
| 8.1.x | 1.33, 1.34, 1.35 | ✅ Stable |
| 9.0.x | 1.33, 1.34, 1.35 | ✅ Stable |
| 9.1.x | 1.33, 1.34, 1.35 | ✅ Stable |
The v2.1.0 release candidate passed the end-to-end suite on Kubernetes v1.33.12 and v1.34.11 (kind) for every Valkey version above, and on Kubernetes v1.35.6 for Valkey 7.2, 8.1 and 9.1.
Use Cases¶
Development and Testing¶
- Quick setup of Valkey instances for application development
- Ephemeral instances with easy cleanup
- Multiple isolated environments
Production Workloads¶
- High-availability data stores with automatic failover
- Distributed caching layers with consistent hashing
- Session stores for web applications
- Message queues and pub/sub systems
Multi-tenant Environments¶
- Isolated Valkey instances per tenant
- Resource quotas and limits
- Network isolation with policies
Comparison with Alternatives¶
vs. Helm Charts¶
- Operator: Continuous reconciliation, automated operations, self-healing
- Helm: One-time deployment, manual operations, limited automation
vs. Managed Services¶
- Operator: Full control, Kubernetes-native, cost-effective
- Managed: Less control, vendor lock-in, potentially higher cost
vs. Manual Deployment¶
- Operator: Automated, consistent, best practices built-in
- Manual: Error-prone, time-consuming, requires deep expertise
Getting Started¶
Quick Installation¶
# Install the operator (requires cert-manager for webhook TLS)
kubectl apply -k https://github.com/chideat/valkey-operator/config/default
# Deploy a simple valkey
cat <<EOF | kubectl apply -f -
apiVersion: rds.valkey.buf.red/v1alpha1
kind: Valkey
metadata:
name: quickstart
namespace: default
spec:
arch: cluster
version: "8.0"
replicas:
shards: 3
replicasOfShard: 1
resources:
requests:
memory: "1Gi"
cpu: "500m"
limits:
memory: "2Gi"
cpu: "1000m"
EOF
# Check status
kubectl get valkey quickstart -w
Next Steps¶
- Read the User Guide for detailed usage instructions
- Explore API Reference for configuration options
- Check Examples for common deployment patterns
- Review Best Practices for production deployments
Community and Support¶
- GitHub Repository: chideat/valkey-operator
- Issues and Bug Reports: GitHub Issues
- Contributing: See CONTRIBUTING.md
- License: Apache 2.0