coreos/ksched

Name: ksched

Owner: CoreOS

Description: Experimental flow-based Kubernetes scheduler

Created: 2016-06-15 20:03:18.0

Updated: 2018-05-08 02:16:30.0

Pushed: 2018-01-04 22:52:27.0

Homepage:

Size: 409

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Ksched: A Firmament Prototype

Firmament is a new apporach to cluster scheduling that models the problem of scheduling as a network flow optimization problem. Firmament aims on providing:

Ksched is an experimental reimplementation of the scheduler from it's C++ implementation to Go. The goal of this project is to integrate Firmament in Kubernetes as an alternative scheduler.

Current State of Project:

The project so far is an early stage prototype with all the mechanisms for performing multiple scheduling iterations.

The scheduler layer has a minimal interface with the Kubernetes API allowing it to batch schedule pods. Currently the implementation has no support for sophisticated policies and will perform a trivial first-fit policy to assign pods to nodes in the cluster.

Trying it Out:

To get the scheduler up and running there are two ways to currently test it out.

Option 1: Running on a live cluster:

You can test the scheduler by running it inside of a container on the kubernetes master node. You can build the image from build/Dockerfile yourself or as described below use our hosted image.

On the master node pull the image.

er pull hasbro17/ksched:v0.6

Run the container on the host network, waiting in background mode.

er run --net="host" --name="ksched" -d hasbro17/ksched:v0.6 tail -f /dev/null

You will need to pause the pre-existing kubernetes scheduler's container before trying to run ksched.

er pause <container-ID>

Get a shell into the ksched container.

er exec -it ksched /bin/bash

Run the init script to clone and build the scheduler.

t/init.sh

There should be two binaries present in the ksched project at /root/go-workspace/src/github.com/coreos/ksched

The first k8sscheduler, is the scheduler whose flags are specified in cmd/k8sscheduler/scheduler.go. Run this binary to start the scheduler.

cheduler -fakeMachines=false

The scheduler should start up and wait for unscheduled pods at this point.

To generate a large number of pod requests you can use the binary podgen.

en -numPods=<number-of-pods> -image=nginx
Option 2: Run with Kubernetes API server:

You can test the scheduler without the real cluster by only having the kube-api binary running. The setup is a little more involved for this case.

You will need to have the same environment set up as is for the ksched image described by build/Dockerfile. Use that as a guide for your setup.


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.