Skip to content

Latest commit

 

History

History
112 lines (83 loc) · 2.54 KB

quickstart.md

File metadata and controls

112 lines (83 loc) · 2.54 KB

Quickstart

Deploy a Valkey Cluster on Kubernetes in under 5 minutes.

Prerequisites

  • Kubernetes cluster v1.31+
  • kubectl v1.31+
  • Helm 3

1. Install the operator

helm repo add valkey https://valkey.io/valkey-helm
helm repo update
helm install valkey-operator valkey/valkey-operator -n valkey-operator-system --create-namespace

Verify the operator is running:

kubectl get pods -n valkey-operator-system

2. Deploy a Valkey Cluster

Create 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
  replicasPerShard: 1
  acl:
    users:
      # Valkey's open default user: any client, no password, every command.
      # For trying the cluster out; restrict or remove it in production.
      - name: default
        password:
          type: Any
        permissions: "~* &* +@all"
EOF

The cluster declares Valkey's open default user so the CLI below works without credentials. A cluster that does not declare default has it disabled; see The default user.

3. Verify the cluster is healthy

Watch the cluster reach Ready state:

kubectl get valkeycluster -w

Expected output:

NAME         STATE   REASON           AGE
my-cluster   Ready   ClusterHealthy   30s

For more detail:

kubectl get valkeynodes

4. Connect to the cluster

Exec 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 -c

Try 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

5. Clean up

kubectl delete valkeycluster my-cluster
helm uninstall valkey-operator -n valkey-operator-system

Current limitations

  • 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 v1alpha1 and may change in future releases
  • Cluster mode only (no standalone or sentinel)

Next steps