Skip to content

Instantly share code, notes, and snippets.

@ogavrisevs
Last active February 19, 2019 14:26
Show Gist options
  • Save ogavrisevs/bc5812bcb5a52b02aeb3f5d4e1e74364 to your computer and use it in GitHub Desktop.
Save ogavrisevs/bc5812bcb5a52b02aeb3f5d4e1e74364 to your computer and use it in GitHub Desktop.
k8s redis-ha with TCP ingress

Install

helm install --name redis \
  --set replicas=2 \
  --set auth=true \
  --set redisPassword=pass \
  --set persistentVolume.enabled=false \
  stable/redis-ha

helm delete --purge redis

Test from k8s.node

yum install redis 
redis-cli -h redis-redis-ha-announce-0.ip -a pass
redis-cli -h  172.20.208.36  -a pass
LPUSH list "world"
LPUSH list "hello"
LRANGE list 0 -1

Expose on elb

vim values.yaml

tcp: {
  6379: "default/redis-redis-ha:6379"
}

helm install --name=nginx-ingress -f values.yaml stable/nginx-ingress

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment