Development
A Development guide for redis operator

Pre-requisites

Access to Kubernetes cluster

First of all, you will need access to a Kubernetes cluster. The easiest way to start is minikube.
  • Virtualbox - hypervisor to run a Kubernetes cluster
  • Minikube - for Kubernetes cluster creation on local machine
  • Kubectl - to interact with Kubernetes cluster

Tools to build an Operator

Apart from kubernetes cluster, there are some tools which are needed to build and test the redis operator.
Required Tools:-

Build Locally

To achieve this, execute this command:-
1
make build
Copied!

Build Image

Redis operator gets packaged as a container image for running on the Kubernetes cluster. These instructions will guide you to build an image.
1
make build-image
Copied!

Testing

If you want to play it on Kubernetes. You can use a minikube.
1
# Start minikube
2
minikube start --vm-driver virtualbox
3
4
# Deploy the image on minikube
5
helm upgrade redis-cluster ./helm/redis-setup \
6
--set redisSetup.setupMode="cluster" \
7
--set redisSetup.clusterSize=3 \
8
--install --namespace redis-operator
Copied!

Run Tests

1
make test
Copied!
Last modified 1yr ago