Gateway connection to Redis in Kubernetes

Using yaml files and deploying them with kubectl. I started based in GitHub - TykTechnologies/tyk-oss-k8s-deployment: Deployment yamls to run Tyk Gateway and Redis in a Kubernetes environment but not using redis part.

I uploaded files on my personal github: GitHub - gpupu/tyk_kubernetes_test
My redis installation, is somehow “manual”. The steps are:

  1. I deploy everything except stateful.yaml and jobs.yaml ( redis$ kubectl -n redis apply -f <file> command for each of the required files)
  2. redis$ kubectl -n redis apply -f stateful.yaml you will see redis-cluster-0 its on pending state.
  3. I run scheduler.sh ( redis$ ./scheduler.sh) . This script manually sets each pod to a determined node. Probably there is an easier way to do this, not sure, but it works. Pods keep on ‘pending’ until processed (there is an sleep command for debug). If it fails, you can run it multiple times until all 6 pods are running.
  4. I run jobs.yaml (redis$ kubectl -n redis apply -f jobs.yaml) which creates an alpine in order to build the cluster and set instances 0,1,2 as master and 3,4,5 as slaves.
  5. tyk-gateway should be just apply all yml files under tyk directory (tyk$ kubectl -n tyk apply -f * should do it).

I think redis-cluster instalation should be easier. So one of my ideas to try fix all this, was start a new redis instalation using helm chart bitnami/redis-cluster. But it just not work out-of-the-box, so I need some work on it.

Also I will try to install a redis-standalone as suggested, if there is not another idea.