Skip to main content

Provisioning a Redis Cache

This guide walks you through provisioning a managed Redis instance for your project and connecting it to your applications for low-latency caching, session management, and real-time data access.

Infrastream handles all underlying complexity including instance sizing, network connectivity within the Shared VPC, regional placement, and SSL/TLS encryption.


Prerequisites

  • You must have an existing Application manifest that will consume the Redis instance.
  • You need to know the identity of your project: organization, organizational-unit, environment, and project.

Step 1: Create a New Manifest File for Redis

Create a new YAML file for your Redis instance inside your infrastream-manifests Git repository.

A common convention is to place Redis manifests in a redis subdirectory: ../project/{project-name}/redis/{instance-name}.yaml

Step 2: Define Your Redis Manifest

Open the file and define the Redis configuration:

apiVersion: lowops.manifests.v1
kind: Redis
metadata:
name: session-cache
project: login-svc
environment: production
organizational-unit: retail-banking
organization: fincorp
spec:
description: "In-memory session store for user authentication tokens"
enabled: true # Controls whether the Redis instance is provisioned
memorySizeGb: 4 # Memory capacity in GB

Key fields:

  • enabled — Controls the creation of the underlying managed cache infrastructure. Set to false to deprovision.
  • memorySizeGb — The physical memory allocation for the instance. Choose based on your expected working set size.

Note: The platform automatically provisions the Redis instance within the project's Shared VPC subnet and configures firewall rules. The instance is only accessible from within the private network.

Step 3: Connect Your Application to Redis

Redis connectivity is injected into your application via environment variables. The platform automatically provisions the connection details (host, port, auth string) and makes them available to your application's runtime.

Your application should read the Redis connection details from the environment variables provided by the platform (the exact variable names depend on your project's configuration).

Tip: If your project uses SSL-enabled Redis (endpoints starting with rediss://), the platform will automatically configure TLS certificates for secure connections.

Step 4: Commit, Review, and Merge

Commit the new Redis manifest in a pull request.

After your PR is reviewed and approved, merge it. The platform will automatically:

  1. Provision a Memorystore for Redis instance with the specified capacity.
  2. Configure private networking so the instance is accessible only from your project's VPC.
  3. Make the connection details available to your application's runtime environment.