Create instances (original) (raw)

Skip to main content

Create instances

This page provides instructions for creating Memorystore for Redis Cluster instances.

Before you begin

Complete the before you begin instructions:

  1. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
    Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.

Go to project selector 2. Make sure that billing is enabled for your project. Learn how to check if billing is enabled on a project. 3. Install and initialize the Google Cloud CLI.
Note: If you installed the gcloud CLI previously, make sure you have the latest version by running gcloud components update. You need at least gcloud CLI version 440.0.0 to access the Memorystore for Redis Cluster gcloud CLI commands. 4. Enable the Memorystore for Redis API
Memorystore for Redis 5. Enable the Network Connectivity API
Network Connectivity API 6. Enable the Service Consumer Management API
Service Consumer Management API

Other prerequisites

Set up networking

Read the Networking page to determine if you need to set up a service connection policy.

If a service connection policy hasn't been created for the network with which you will create the Redis cluster, follow the Networkingguidance to create it.

Create an instance

Console

  1. In the Google Cloud console, go to the Memorystore for Redis Clusterpage.
    Memorystore for Redis Cluster
  2. Click Create cluster.
  3. In the Name your cluster instance section, enter an ID for the cluster. The Cluster ID must use only lowercase letters, numbers, and hyphens. It must also start with a letter and be unique in its region.
  4. From the Region menu, select a region for your cluster.
  5. In the Zonal availability section, select the Multi-zone option because you want to create a multi-zonecluster.
  6. In the Node Type section, select a node type.
  7. In the Cluster size section, enter the number of shards for your cluster. The shard count determines the total memory capacity for storing cluster data. For more information about cluster specifications, seeCluster and node specification.
  8. If you want to create a cluster with replicas, then in theReplicas section, select the number of replicas (per shard). You can select 0-5 replicas. The default value is 1 replica.
  9. In the Set up connection section, select the network that your applications can use to connect to this cluster. For more information about private networking for Memorystore for Redis Cluster, see Networking overview.
  10. If you want to increase the security of your cluster, then in the Security section, enable IAM authentication by selecting the Enable IAM AUTH checkbox.
  11. In the Certificate authority management section, select thePer-instance CA, Customer-managed CA, or Shared CA option. These options represent the Certificate Authority (CA) modes for your cluster. The CA mode determines which CA hierarchy is used to issue the digital certificates for the cluster.
    If you select the Customer-managed CA option, then you must add a CA pool. A CA pool is a collection of multiple CAs with a common certificate issuance policy and Identity and Access Management (IAM) policy. A CA pool makes CA rotation management easier and lets you achieve higher total effective queries per second (QPS).
    To add a CA pool, do one of the following:
  12. To add a CA pool from another Google Cloud project, select theAdd CA from another project checkbox, and then enter the resource IDfor the pool in the text field.
  13. To add a CA pool that's located in the same Google Cloud project as the project that you're using to create the cluster, select the pool from the CA pool menu.
  14. In the Encryption section, select one of the following options:
  1. In the Data persistence strategy section, specify how you want Memorystore for Redis Cluster to persist the data in your cluster. Acceptable values are No persistence,Append Only File (AOF) persistence, and Redis Database (RDB) persistence.
  2. If you want to enable automated backups for your cluster, then do the following:
  3. Select the Automated daily backups checkbox.
  4. In the Days to retain backups field, enter the number of days that you want Memorystore for Redis Cluster to keep backups before they're deleted automatically. You can specify from 1 to 365 days. The default value is 35 days.
  5. From the Time window menu, select a time for the daily backup.
  6. In the Maintenance section, select one of the following options:
  1. Click Create cluster.

gcloud

To create a Memorystore for Redis Cluster instance, run the create command:

gcloud redis clusters create INSTANCE_ID
--region=REGION_ID
--network=NETWORK
--replica-count=REPLICA_COUNT
--node-type=NODE_TYPE
--shard-count=SHARD_COUNT

Replace the following:

For example:

gcloud alpha redis clusters create my-instance
--region=us-central1
--network=projects/my-project-335118/global/networks/default
--replica-count=2
--node-type=redis-highmem-medium
--shard-count=8

By default, in-transit encryptionis disabled, and the authorized network is default.

Create a single-zone instance

This section provides instructions on creating a Single-zone instance.

Console

  1. In the Google Cloud console, go to the Memorystore for Redis Clusterpage.
    Memorystore for Redis Cluster
  2. Click Create cluster.
  3. In the Name your cluster instance section, enter an ID for the cluster. The Cluster ID must use only lowercase letters, numbers, and hyphens. It must also start with a letter and be unique in its region.
  4. From the Region menu, select a region for your cluster.
  5. In the Zonal availability section, do the following:
    1. Select the Single zone option.
    2. From the Zone menu, select the zone where you want Memorystore for Redis Cluster to create the cluster.
  6. In the Node Type section, select a node type.
  7. In the Cluster size section, enter the number of shards for your cluster. The shard count determines the total memory capacity for storing cluster data. For more information about cluster specifications, seeCluster and node specification.
  8. If you want to create a cluster with replicas, then in theReplicas section, select the number of replicas (per shard). You can select 0-5 replicas. The default value is 1 replica.
  9. In the Set up connection section, select the network that your applications can use to connect to this cluster. For more information about private networking for Memorystore for Redis Cluster, see Networking overview.
  10. If you want to increase the security of your cluster, then in the Security section, enable IAM authentication by selecting the Enable IAM AUTH checkbox.
  11. In the Certificate authority management section, select thePer-instance CA, Customer-managed CA, or Shared CA option. These options represent the Certificate Authority (CA) modes for your cluster. The CA mode determines which CA hierarchy is used to issue the digital certificates for the cluster.
    If you select the Customer-managed CA option, then you must add a CA pool. A CA pool is a collection of multiple CAs with a common certificate issuance policy and Identity and Access Management (IAM) policy. A CA pool makes CA rotation management easier and lets you achieve higher total effective queries per second (QPS).
    To add a CA pool, do one of the following:
  12. To add a CA pool from another Google Cloud project, select theAdd CA from another project checkbox, and then enter the resource IDfor the pool in the text field.
  13. To add a CA pool that's located in the same Google Cloud project as the project that you're using to create the cluster, select the pool from the CA pool menu.
  14. In the Encryption section, select one of the following options:
  1. In the Data persistence strategy section, specify how you want Memorystore for Redis Cluster to persist the data in your cluster. Acceptable values are No persistence,Append Only File (AOF) persistence, and Redis Database (RDB) persistence.
  2. If you want to enable automated backups for your cluster, then do the following:
  3. Select the Automated daily backups checkbox.
  4. In the Days to retain backups field, enter the number of days that you want Memorystore for Redis Cluster to keep backups before they're deleted automatically. You can specify from 1 to 365 days. The default value is 35 days.
  5. From the Time window menu, select a time for the daily backup.
  6. In the Maintenance section, select one of the following options:
  1. Click Create cluster.

gcloud

To create a single-zone instance, run the create command:

gcloud redis clusters create INSTANCE_ID
--region=REGION_ID
--network=NETWORK
--replica-count=REPLICA_COUNT
--node-type=NODE_TYPE
--shard-count=SHARD_COUNT
--zone-distribution-mode=ZONE_DISTRIBUTION_MODE
--zone=ZONE

Replace the following:

Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2026-06-16 UTC.