Contains k8s config files to start a Redis Sentinel service in kubernetes.
All steps and files are nearly identical to the ones found in this tutorial
kubectl
is installed and configured properly for your needs.
kubectl create namespace redis
kubectl apply -f redis-config.yaml
kubectl apply -f redis-acl.yaml
kubectl apply -f redis.yaml
kubectl apply -f sentinel.yaml
kubectl apply -f redis-service.yaml
kubectl apply -f sentinel-service.yaml
You should now see the pods running by running the following:
kubectl -n redis get all
NAME READY STATUS RESTARTS AGE
pod/redis-0 1/1 Running 0 7m38s
pod/redis-1 1/1 Running 0 7m16s
pod/redis-2 1/1 Running 0 6m54s
pod/sentinel-2 1/1 Running 0 14s
pod/sentinel-1 1/1 Running 0 11s
pod/sentinel-0 1/1 Running 0 7s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/redis ClusterIP None <none> 6379/TCP 27h
service/sentinel ClusterIP None <none> 26379/TCP 27h
NAME READY AGE
statefulset.apps/redis 3/3 7m39s
statefulset.apps/sentinel 3/3 4m49s