Skip to main content

redis


설치

info

사용할 StorageClassallowVolumeExpansiontrue인 지 확인 후 진행해주세요.

helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update bitnami \
&& helm search repo bitnami/redis -l | head -n 10
helm show values bitnami/redis \
--version 17.4.2 \
> redis-values.yaml
redis-value.yaml
commonLabels: {}

architecture: standalone
auth:
enabled: false
sentinel: false
commonConfiguration: |-
#
activedefrag yes
#
lazyfree-lazy-eviction yes
lazyfree-lazy-expire yes
lazyfree-lazy-server-del yes
lazyfree-lazy-user-del yes
replica-lazy-flush yes
#
maxmemory 2gb
maxmemory-policy allkeys-lru
# Enable AOF https://redis.io/topics/persistence#append-only-file
appendonly no
# Disable RDB persistence, AOF persistence already enabled.
save ""
master:
resources:
limits: {}
requests: {}
podLabels: {}
persistence:
enabled: true
helm upgrade redis bitnami/redis \
--version 17.4.2 \
-n storage \
--values redis-values.yaml \
> redis.yaml
helm upgrade redis bitnami/redis \
--install \
--version 17.4.2 \
-n storage \
--history-max 3 \
--values redis-values.yaml

Test

kubectl run tmp-redis --rm -it --image redis -- redis-cli -h redis-master.storage