- git
- go version v1.13+.
- mercurial version 3.9+
- docker version 17.03+.
- kustomize version 3.5.4+.
- kubectl version v1.12.0+.
- Access to a Kubernetes v1.12.0+ cluster.
- Operator-SDK
Install Operator sdk, create a GKE cluster and connect cluster
cd ./demo
# Start beanstalkd container using docker-compose
docker-compose up -d
cd ../
make manager
make install
operator-sdk up local
# Run it and Open a new terminal
# Terminal 2
watch kubectl get deployment
# Terminal 3
watch kubectl get QueueAutoScaler
# Terminal 4
kubectl apply -f example/demo/demo.yaml #custom resource for demo we are only deploying nginx image but in real case it's your worker image
# Open http://127.0.0.1 and add job in default tube. cross the thresold of 4 and check terminal 1 log and also get deployment watch
# After verifing the autoscale delete all jobs from default tube and again watch terminal1 and deployment
kubectl delete -f example/demo/demo.yaml
# It will also delete the deployment with crd defination
#Update Image name is Make file
make docker-build
make docker-push