Redis
Need a fast cache or session store? Lucity deploys Redis instances as standard Kubernetes Deployments with ClusterIP Services. No operator, no cluster mode complexity. Just Redis doing what Redis does best.
Add a Redis Instance
Define a Redis instance under databases.redis in your project's values.yaml:
databases:
redis:
cache:
image: redis:7-alpine
resources:
requests:
cpu: 50m
memory: 64Mi
limits:
cpu: 200m
memory: 128Mi
Lucity creates a Deployment and a ClusterIP Service. Your Redis instance is up and reachable within the namespace.
Configuration Options
| Option | Description | Example |
|---|---|---|
image | Redis container image and tag. | redis:7-alpine |
resources.requests.cpu | Minimum CPU allocation. | 50m |
resources.requests.memory | Minimum memory allocation. | 64Mi |
resources.limits.cpu | Maximum CPU allocation. | 200m |
resources.limits.memory | Maximum memory allocation. | 128Mi |
Pick an image tag that suits your needs. redis:7-alpine is a solid default: small footprint, current stable release.
Connect From Your Application
Redis is accessible via Kubernetes DNS on the default port (6379):
redis://cache.myproject.svc.cluster.local:6379
The hostname follows the pattern <name>.<namespace>.svc.cluster.local. No external dependencies, no connection strings managed by the platform. Standard Kubernetes service discovery.
In your application config:
config:
app-config:
REDIS_URL: "redis://cache:6379"
If your application runs in the same namespace (which it does), you can use the short name cache:6379. Kubernetes DNS resolves it automatically.
What Happens on Eject
You get standard Kubernetes Deployment and Service manifests. Drop-in compatible with any Kubernetes cluster. No operator required, no custom resources. It's just Redis in a pod behind a service, the way it's been deployed since Kubernetes 1.0.