Skip to content

Latest commit

 

History

History
53 lines (38 loc) · 1.39 KB

autoscale.md

File metadata and controls

53 lines (38 loc) · 1.39 KB

Run Autoscaling job on your local machine

This documentation shows an example to run two jobs on a local kubernetes cluster and see the job scaling status.

Prerequisites

Run local Autoscaling job

  1. Start a local minikube cluster.

    minikube start --kubernetes-version v1.6.4
  2. Run the following commands to create sample training workspace and data.

    mkdir /path/to/workspace
    cp $REPO_PATH/doc/autoscale_example/*.py /path/to/workspace
    mkdir -p /path/to/workspace/data/
    cp -r $REPO_PATH/doc/autoscale_example/uci_housing/ /path/to/workspace/data/
  3. Mount the workspace folder into Minikube:

    minikube mount /path/to/workspace:/workspace

    The minikube mount command will block, so start a new terminal to continue the tutorial.

  4. Start controller and a example job:

    cd $REPO_PATH/k8s/controller
    kubectl create -f controller.yaml
    kubectl create -f trainingjob_resource.yaml
    kubectl create -f autoscale_job/
    kubectl get pods
  5. Start another job simulating cluster load, then you can observe the scale process using kubectl get pods:

    kubectl create -f autoscale_load/
    kubectl get pods