diff --git a/README 2.md b/README 2.md deleted file mode 100644 index b09639bc962..00000000000 --- a/README 2.md +++ /dev/null @@ -1,68 +0,0 @@ -# kubernetes Event Scale Controller - -### Getting started: - -I'm following this https://blog.openshift.com/kubernetes-deep-dive-code-generation-customresources/. There is also `k8s.io/sample-controller` project which contains most of the boilerplate code in this repo. - -1. Clone the project - -```bash -cd $GOPATH/src -mkdir -p github.com/Azure/Kore -git clone https://github.com/Azure/Kore github.com/Azure/Kore -``` - -2. Get all the dependencies - -```bash -go get k8s.io/client-go/... -go get k8s.io/apimachinery/... -go get k8s.io/code-generator/... -``` - -3. Files under `pkg/client` as well as `pkg/apis/kesc/v1alpha1/zz_generated.deepcopy.go` are autogenerated client libraries based on the other files under `pkg/apis`. `pkg/signals` is copied from `k8s.io/sample-client/pkg/signals` - -4. To generate the client, you can run `hack/generate-groups.sh`. Make sure `GOPATH` is defined. - -5. Deploy `ScaledObject` CRD to your cluster - -```bash -kubectl create -f crd/scaledobject-crd.yaml -``` - -6. Deploy a functions pod with a service using - -```bash -kubectl create -f crd/functions-deployment.yaml - -# check deployment -kubectl get deployments -``` - -The sample deployment above deploys `mcr.microsoft.com/azure-functions/dotnet:2.0` image which is a vanilla empty functions image. - -The replica count should be 0 for that deployment by default. - -7. Deploy a `ScaledObject` that reference that deployment by name - -```bash -kubectl create -f crd/example-scaledobject-crd.yaml -``` - -8. Run the scale controller - -```bash -go run *.go --kubeconfig=/home/ahmed/.kube/config -# OR -go run *.go --kubeconfig=C:\Users\ahmels\.kube\config -``` - -The scale controller is watching for ScaledObjects and Deployments. If there is a ScaledObject, it gets its associated deployment and updates its replicas from 0 to 1. - -9. You can controll the replica set for your deployment using `kubectl` and see the controller scaling it back to 1. - -```bash -kubectl scale --replicas=0 deployment/azure-functions-deployment -``` - -![k](https://user-images.githubusercontent.com/645740/51940231-46cf5380-23c6-11e9-9433-39cdd4055b4c.gif) \ No newline at end of file diff --git a/README.md b/README.md index 72f1506a93b..bf9d2f480db 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,69 @@ +# Kore - Event driven autoscaler and scale to zero for Kubernetes + +Kore allows for fine grained autoscaling (including to/from zero) for event driven Kubernetes workloads. +Kore serves as a Kubernetes Metrics Server and allows users to define autoscaling rules using a dedicated CRD. + +Kore can run on both the cloud and the edge, integrates natively with Kubernetes components such as the Horizontal Pod Autoscaler, and has no external dependencies. + +![k](https://user-images.githubusercontent.com/645740/51940231-46cf5380-23c6-11e9-9433-39cdd4055b4c.gif) + +## Setup + +### Prerequisites + +1. A Kubernetes cluster [(instructions)](https://kubernetes.io/docs/tutorials/kubernetes-basics/). + + Make sure your Kubernetes cluster is RBAC enabled. + For AKS cluster ensure that you download the AKS cluster credentials with the following CLI + + ```cli + az aks get-credentials -n -g + ``` + +2. *Kubectl* has been installed and configured to work with your cluster [(instructions)](https://kubernetes.io/docs/tasks/tools/install-kubectl/). + +### Deploy Kore + +Clone the repo: + +``` +git clone https://github.com/Azure/Kore.git +``` + +Deploy: + +``` +kubectl apply -f ./Kore/deploy +``` + +## Getting Started + + +## Development + +### Prerequisites + +1. The Go language environment [(instructions)](https://golang.org/doc/install). + + Make sure you've already configured your GOPATH and GOROOT environment variables. +2. Dep [(instructions)](https://github.com/golang/dep). + +### Environment set up + +First, clone the repo into your GOPATH: + +``` +cd $GOPATH/src +mkdir -p github.com/Azure/Kore +git clone https://github.com/Azure/Kore +``` + +Run dep: + +``` +cd $GOPATH/src/github.com/Azure/Kore +dep ensure +``` # Contributing