In order to setup redis-operator, you'll need access to a Kubernetes cluster:-
Virtualbox - hypervisor to run a Kubernetes cluster
Minikube - for Kubernetes cluster creation on local machine
Kubectl - to interact with Kubernetes cluster
Minikube is a minimal Kubernetes cluster run in a virtual machine (here in VirtualBox).
minikube start --vm-driver virtualbox
From now on your local Kubernetes client kubectl
is configured to use your just started Minikube cluster.
First, we need to create a namespace for our resources to be deployed in. This is for the sake of separation and keeping order:
kubectl create namespace redis-operator
Redis operator by default watches for every change in Redis Configuration.
kubectl apply -f example/redis-standalone-example.yaml -n redis-operator
kubectl apply -f example/redis-cluster-example.yaml -n redis-operator
# To delete standalone setupkubectl delete -f example/redis-standalone-example.yaml -n redis-operator# To delete cluster setupskubectl delete -f example/redis-cluster-example.yaml -n redis-operator