Create instances

This page provides instructions for creating single-zone and multi-zone instances in Memorystore for Valkey.

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 489.0.0 to access the Memorystore for Valkey gcloud CLI commands.

  4. Enable the Memorystore for Valkey API
    Memorystore for Valkey
  5. Enable the Network Connectivity API
    Network Connectivity API
  6. Enable the Service Consumer Management API
    Service Consumer Management API

Other prerequisites

  • You must have one of these IAM roles in the Google Cloud project you're using:
    • roles/memorystore.admin (the Memorystore Admin predefined IAM role)
    • roles/owner (the Owner basic IAM role)
    • roles/editor (the Editor basic IAM role)

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 Valkey instance, follow the Networking guidance to create it.

Create a multi-zone instance

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

Console

  1. In the Google Cloud console, go to the Memorystore for Valkey page.

    Memorystore for Valkey

  2. Click Create instance.

  3. In the Name your instance section, enter an ID for the instance. The instance 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 instance.

  5. In the Zonal availability section, select the Multi-zone option because you want to create a multi-zone instance.

  6. In the Cluster Mode section, specify whether you want a Cluster Mode Enabled or Cluster Mode Disabled instance. For more information about these types of instances, see Enable and disable cluster mode.

  7. In the Node Type section, select a node type.

  8. In the Instance size section, enter the number of shards for your instance. The shard count determines the total memory capacity for storing instance data. For more information about instance specifications, see Instance and node specification.

  9. If you want to create an instance with replicas, then in the Replicas section, select the number of replicas (per shard). You can select 0-5 replicas. The default value is 1 replica.

  10. In the Set up connection section, select the network that your applications can use to connect to this instance. For more information about private networking for Memorystore for Valkey, see Networking.

  11. If you want to increase the security of your instance, then in the Security section, do one of the following:

    • If you want to enable IAM authentication, then select the IAM Auth option. Memorystore for Valkey uses IAM authentication to restrict access to the instance.

    • If you want to enable basic token-based authentication, then select the Token Auth option. Memorystore for Valkey restricts access to the instance by having clients use their authentication tokens to verify their identities within your applications.

    • If you don't want to enable IAM authentication or basic token-based authentication, then select the Disabled option.

    If you select the IAM Auth or Token Auth options, then Memorystore for Valkey selects the Enable In-Transit Encryption (TLS) checkbox automatically, and the Certificate authority management section is displayed. Memorystore for Valkey encrypts your credentials so that they're confidential when they're transmitted from the instance to the application.

  12. In the Certificate authority management section, select the Per-instance CA, Customer-managed CA, or Shared CA option. These options represent the Certificate Authority (CA) modes for your instance. The CA mode determines which CA hierarchy is used to issue the digital certificates for the instance.

    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:

    1. To add a CA pool from another Google Cloud project, select the Add CA from another project checkbox, and then enter the resource ID for the pool in the text field.

    2. To add a CA pool that's located in the same Google Cloud project as the project that you're using to create the instance, select the pool from the CA pool menu.

  13. In the Encryption section, select one of the following options:

    • Google-managed encryption key: you want Google to use a key to encrypt the data in the instance. This is Google default encryption.
    • Cloud KMS key: you want to manage the encryption of your data by using customer-managed encryption keys (CMEKs) in Cloud Key Management Service (Cloud KMS) with CMEK-integrated services, such as Memorystore for Valkey.

      If you select this option, then do the following:

      1. From the Key management type menu, select Cloud KMS.
      2. From the Select a Cloud KMS key menu, select a CMEK.
  14. To assign an ACL policy to the instance, select a policy from the Policy menu in the ACL policy section.