Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jithin-scaria
Last active December 12, 2023 08:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save jithin-scaria/acad301aeb452b2c2fda850fdcc41d28 to your computer and use it in GitHub Desktop.
Save jithin-scaria/acad301aeb452b2c2fda850fdcc41d28 to your computer and use it in GitHub Desktop.
redis-config configMap
apiVersion: v1
kind: ConfigMap
metadata:
name: redis-config
namespace: redis
data:
redis.conf: |
# important configurations
# ------------------------
cluster-enabled yes
# configuration file used by redis to store cluster info - do not create.
# created by redis, just give a path with a filename
cluster-config-file /conf/nodes-6379.conf
bind 0.0.0.0
# configurations for snaposhot and AOF
# read more : https://redis.io/docs/manual/persistence/
dbfilename dump.rdb
dir /data
appendonly yes
appendfilename "appendonly.aof"
# Enabled ACL based auth.
protected-mode yes
# This is used by the replics nodes to communicate with master to replicate the data.
# we are using a user called "replication" for this, and the a strong pwd for the same is given in masterauth
masterauth `5$!DfwSJ.Y(d:@M
masteruser replication
# this is the second ConfiMap will be mounted to. it has the list of uses needed.
aclfile /conf/acl/users.acl
# port, each redis nodes will be used
port 6379
# More configurations are optional, if not provided, redis will consider default values ------
# ------ More details on configuration : https://redis.io/docs/manual/config/ ------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment