Skip to content

GcpRedisInstance Custom Resource ​

The gcpredisinstance.cloud-resources.kyma-project.io is a namespace-scoped custom resource (CR). It describes the Google Memorystore Redis instance. Once the instance is provisioned, a Kubernetes Secret with endpoint and credential details is provided in the same namespace. By default, the created auth Secret has the same name as the GcpRedisInstance, unless specified otherwise.

The current implementation supports Basic and Standard(without replicas) tiers, which are explained in detail on the Google's Memorystore for Redis overview page.

Redis requires a /28 ip range. For more information, see Configure a reserved IP address range. Those IP addresses are allocated from the IpRange CR. If an IpRange CR is not specified in the GcpRedisInstance, then the default IpRange is used. If the default IpRange does not exist, it is automatically created. Manually create a non-default IpRange with specified Classless Inter-Domain Routing (CIDR) and use it only in advanced cases of network topology when you want to control the network segments to avoid range conflicts with other networks.

When creating GcpRedisInstance, only the redisTier field is mandatory. It specifies the service tier (Standard or Premium), and the capacity tier. Read on for more details.

Optionally, you can specify the redisVersion, authEnabled, redisConfigs, and maintenancePolicy fields.

In-transit Encryption ​

In-transit encryption is always enabled. Communication with the Redis instance requires a certificate. The certificate can be found in the Secret on the .data.CaCert.pem path.

Persistence ​

Persistence is not supported. Data is not written to durable storage (i.e., data at rest).

Redis Tiers ​

Standard Tier ​

In the Standard service tier, the instance does not have a replica. Thus, it cannot be considered highly available.

RedisTierCapacity (GiB)Network (minimum Gbps)
S1110
S2310
S3610
S41210
S52410
S64816
S710116
S820016

Premium Tier ​

In the Premium service tier, the instance comes with a read replica and automatic failover enabled. Thus, it can be considered highly available.

RedisTierCapacity (GiB)Network (minimum Gbps)
P1510
P21210
P32410
P44816
P510116
P620016

Specification ​

This table lists the parameters of GcpRedisInstance, together with their descriptions:

ParameterTypeDescription
ipRangeobjectOptional. IpRange reference. If omitted, the default IpRange is used. If the default IpRange does not exist, it will be created.
ipRange.namestringRequired. Name of the existing IpRange to use.
redisTierstringRequired. The Redis tier of the instance. Supported values are S1, S2, S3, S4, S5, S6, S7, S8 for the Standard offering, and P1, P2, P3, P4, P5, P6 for the Premium offering.
redisVersionintOptional. The version of Redis software. Supported values are REDIS_7_2, REDIS_7_0, and REDIS_6_X. Defaults to REDIS_7_0. Can be upgraded.
authEnabledboolOptional. Indicates whether OSS Redis AUTH is enabled for the instance. If set to true, AUTH is enabled on the instance. Defaults to false
redisConfigsobjectOptional. Provided values are passed to the Redis configuration. Supported values can be read on Google's Supported Redis configurations page. If left empty, defaults to an empty object.
maintenancePolicyobjectOptional. Defines a desired maintenance policy. Only one policy can be active at a time. If not provided, maintenance events can be performed at any time. To learn more about maintenance policy limitations and requirements, see About maintenance on Memorystore for Redis.
maintenancePolicy.dayOfWeekobjectOptional. Defines maintenance policy to a specific day.
maintenancePolicy.dayOfWeek.daystringRequired. The day of the week that maintenance updates occur. Supported values are MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY.
maintenancePolicy.dayOfWeek.startTimeobjectRequired. Defines the start time of the policy in UTC time.
maintenancePolicy.dayOfWeek.startTime.hoursintRequired. Hours of day in 24-hour format. Accepts values from 0 to 23
maintenancePolicy.dayOfWeek.startTime.minutesintRequired. Minutes of an hour of the day. Accepts values from 0 to 59.
authSecretobjectOptional. Auth Secret options.
authSecret.namestringOptional. Auth Secret name.
authSecret.labelsobjectOptional. Auth Secret labels. Keys and values must be a string.
authSecret.annotationsobjectOptional. Auth Secret annotations. Keys and values must be a string.
authSecret.extraDataobjectOptional. Additional Secret Data entries. Keys and values must be a string. Allows users to define additional data fields that will be present in the Secret. The well-known data fields can be used as templates. The templating follows the Golang templating syntax.

Auth Secret Details ​

The following table list the meaningful parameters of the auth Secret:

ParameterTypeDescription
.metadata.namestringName of the auth Secret. It will share the name with the GcpRedisInstance unless specified otherwise
.metadata.labelsobjectSpecified custom labels (if any)
.metadata.annotationsobjectSpecified custom annotations (if any)
.data.hoststringPrimary connection host.
.data.portstringPrimary connection port.
.data.primaryEndpointstringPrimary connection endpoint. Provided in <host>:<port> format.
.data.authStringstringAuth string. Provided if authEnabled is set to true.
.data.CaCert.pemstringCA Certificate that must be used for TLS. Provided if transit encryption is set to server authentication.

Sample Custom Resource ​

yaml
apiVersion: cloud-resources.kyma-project.io/v1beta1
kind: GcpRedisInstance
metadata:
  name: gcpredisinstance-sample
spec:
  redisTier: "P1"
  redisVersion: REDIS_7_0
  authEnabled: true
  redisConfigs:
    maxmemory-policy: volatile-lru
    activedefrag: "yes"
  maintenancePolicy:
    dayOfWeek:
      day: "TUESDAY"
      startTime:
          hours: 15
          minutes: 45