cloud-foundation-fabric/blueprints/gke/patterns/redis-cluster
Ludovico Magnocavallo 6941313c7d
Factories refactor (#1843)
* factories refactor doc

* Adds file schema and filesystem organization

* Update 20231106-factories.md

* move factories out of blueprints and create new factories  README

* align factory in billing-account module

* align factory in dataplex-datascan module

* align factory in billing-account module

* align factory in net-firewall-policy module

* align factory in dns-response-policy module

* align factory in net-vpc-firewall module

* align factory in net-vpc module

* align factory variable names in FAST

* remove decentralized firewall blueprint

* bump terraform version

* bump module versions

* update top-level READMEs

* move project factory to modules

* fix variable names and tests

* tfdoc

* remove changelog link

* add project factory to top-level README

* fix cludrun eventarc diff

* fix README

* fix cludrun eventarc diff

---------

Co-authored-by: Simone Ruffilli <sruffilli@google.com>
2024-02-26 10:16:52 +00:00
..
manifest-templates GKE stateful blueprints (#2059) 2024-02-08 18:28:41 +00:00
README.md GKE stateful blueprints (#2059) 2024-02-08 18:28:41 +00:00
main.tf GKE stateful blueprints (#2059) 2024-02-08 18:28:41 +00:00
providers.tf GKE stateful blueprints (#2059) 2024-02-08 18:28:41 +00:00
tutorial.md GKE stateful blueprints (#2059) 2024-02-08 18:28:41 +00:00
variables.tf GKE stateful blueprints (#2059) 2024-02-08 18:28:41 +00:00
versions.tf Factories refactor (#1843) 2024-02-26 10:16:52 +00:00

README.md

Highly Available Redis Cluster on GKE

Introduction

This blueprint shows how to deploy a highly available Redis cluster on GKE following Google's recommended practices for creating a stateful application.

Requirements

This blueprint assumes the GKE cluster already exists. We recommend using the accompanying Autopilot Cluster Pattern to deploy a cluster according to Google's best practices. Once you have the cluster up-and-running, you can use this blueprint to deploy Kueue in it.

Cluster authentication

Once you have a cluster with, create a terraform.tfvars and setup the credentials_config variable. We recommend using Anthos Fleet to simplify accessing the control plane.

Redis Cluster Configuration

This template exposes several variables to configure the Redis cluster:

  • namespace which controls the namespace used to deploy the Redis instances
  • image to change the container image used by the Redis cluster. Defaults to redis:6.2 (i.e. the official Redis image, version 6.2)
  • stateful_config to customize the configuration of the Redis' stateful set configuration. The default configuration deploys a 6-node cluster with requests for 1 CPU, 1Gi of RAM and a 10Gi volume.

Any other configuration can be applied by directly modifying the YAML manifests under the manifest-templates directory.

Sample Configuration

The following template as a starting point for your terraform.tfvars

credentials_config = {
  kubeconfig = {
    path = "~/.kube/config"
  }
}
statefulset_config = {
  replicas = 8
  resource_requests = {
    cpo    = "2"
    memory = "2Gi"
  }
}

Variables

name description type required default
credentials_config Configure how Terraform authenticates to the cluster. object({…})
image Container image to use. string "redis:6.2"
namespace Namespace used for Redis cluster resources. string "redis"
statefulset_config Configure Redis cluster statefulset parameters. object({…}) {}
templates_path Path where manifest templates will be read from. Set to null to use the default manifests. string null