Redis Deployment
4️⃣ Where to deploy Redis? (VM / Docker / Kubernetes)¶
✅ Option 1 – Directly on a VM (bare-metal / cloud VM)¶
-
Install using package manager (
apt,yum) -
Simple for small to medium setups
-
Use systemd service to keep it running
-
You manage:
-
config
-
backups
-
upgrades
-
Good for: single node, dedicated server, low complexity.
✅ Option 2 – Docker on a VM¶
- Run Redis as a container:
Pros:
-
Easy to start/stop
-
Easy to version control config using
docker-compose -
Can run app + Redis side-by-side
Good for: dev, staging, and small production with 1–3 nodes.
✅ Option 3 – Kubernetes¶
-
Redis runs as:
-
StatefulSet(for persistent identity) -
Service(for stable access)
-
-
Use Helm charts (Bitnami, Redis official) instead of writing all YAML yourself.
-
K8s handles:
-
restarts
-
scheduling
-
rolling updates
-
Good for: when your whole stack is already on K8s and you know K8s basics.