Deploy a Valkey Cluster on Kubernetes in under 5 minutes.
- Kubernetes cluster v1.31+
- kubectl v1.31+
- Helm 3
helm repo add valkey https://valkey.io/valkey-helm
helm repo update
helm install valkey-operator valkey/valkey-operator -n valkey-operator-system --create-namespaceVerify the operator is running:
kubectl get pods -n valkey-operator-systemCreate a 3-shard cluster with 1 replica per shard (6 pods total):
kubectl apply -f - <<EOF
apiVersion: valkey.io/v1alpha1
kind: ValkeyCluster
metadata:
name: my-cluster
spec:
shards: 3
replicas: 1
EOFWatch the cluster reach Ready state:
kubectl get valkeycluster -wExpected output:
NAME STATE REASON AGE
my-cluster Ready ClusterHealthy 30s
For more detail:
kubectl get valkeynodesExec into a Valkey pod and use the CLI:
kubectl exec -it $(kubectl get pods -l app.kubernetes.io/name=valkey -o jsonpath='{.items[0].metadata.name}') -- valkey-cli -cTry some commands:
127.0.0.1:6379> SET hello world
OK
127.0.0.1:6379> GET hello
"world"
127.0.0.1:6379> CLUSTER INFO
kubectl delete valkeycluster my-cluster
helm uninstall valkey-operator -n valkey-operator-system- Requires Valkey 9.0+ for scale-out/in support
- No cert-manager integration (manual TLS Secret only)
- No module support
- No backup/restore
- No default shard-aware anti-affinity (user-configurable via Kubernetes affinity rules)
- No operator-managed external access (LoadBalancer/Ingress)
- API is
v1alpha1and may change in future releases - Cluster mode only (no standalone or sentinel)
- ValkeyCluster — CRD reference and configuration options
- Status conditions — understanding cluster health