• Stars
    star
    177
  • Rank 214,318 (Top 5 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 6 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An example of kubernetes scheduler extender

k8s-scheduler-extender-example

This is an example of Kubernetes Scheduler Extender

How to

0. checkout the repo

$ git clone [email protected]:everpeace/k8s-scheduler-extender-example.git
$ cd k8s-scheduler-extender-example
$ git submodule update --init

1. buid a docker image

$ IMAGE=YOUR_ORG/YOUR_IMAGE:YOUR_TAG

$ docker build . -t "${IMAGE}"
$ docker push "${IMAGE}"

2. deploy my-scheduler in kube-system namespace

please see ConfigMap in extender.yaml for scheduler policy json which includes scheduler extender config.

# bring up the kube-scheduler along with the extender image you've just built
$ sed 's/a\/b:c/'$(echo "${IMAGE}" | sed 's/\//\\\//')'/' extender.yaml | kubectl apply -f -

For ease of observation, start streaming logs from the extender:

$ kubectl -n kube-system logs deploy/my-scheduler -c my-scheduler-extender-ctr -f
[  warn ] 2018/11/07 08:41:40 main.go:84: LOG_LEVEL="" is empty or invalid, fallling back to "INFO".
[  info ] 2018/11/07 08:41:40 main.go:98: Log level was set to INFO
[  info ] 2018/11/07 08:41:40 main.go:116: server starting on the port :80

Open up an another termianl and proceed.

3. schedule test pod

you will see test-pod will be scheduled by my-scheduler.

$ kubectl create -f test-pod.yaml

$ kubectl describe pod test-pod
Name:         test-pod
...
Events:
  Type    Reason                 Age   From               Message
  ----    ------                 ----  ----               -------
  Normal  Scheduled              25s   my-scheduler       Successfully assigned test-pod to minikube
  Normal  SuccessfulMountVolume  25s   kubelet, minikube  MountVolume.SetUp succeeded for volume "default-token-wrk5s"
  Normal  Pulling                24s   kubelet, minikube  pulling image "nginx"
  Normal  Pulled                 8s    kubelet, minikube  Successfully pulled image "nginx"
  Normal  Created                8s    kubelet, minikube  Created container
  Normal  Started                8s    kubelet, minikube  Started container

License

Copyright 2018 Shingo Omura <https://github.com/everpeace>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

More Repositories

1

vagrant-mesos

Spin up your Mesos Cluster with Vagrant! (VirtualBox and AWS)
Ruby
435
star
2

ml-class-assignments

Programming Exercises on http://ml-class.org
MATLAB
427
star
3

kube-openmpi

Open MPI jobs on Kubernetes
Makefile
109
star
4

cookbook-mesos

Cookbook for Mesos (http://mesos.apache.org/).
Ruby
74
star
5

concourse-gitlab-flow

concourse pipeline sample of environment branches with GitLab flow branching model
Shell
62
star
6

k8s-host-device-plugin

very thin kubernetes device plugin which just exposes device files in host to containers.
Go
46
star
7

kafka-reassign-optimizer

Kafka Partitions Re-Assignment Optimizer in scala
Scala
45
star
8

ml-examples-by-scalala

Machine Learning Algorithms Samples By Scalala
Scala
35
star
9

kube-throttler

throttling your pods in kubernetes cluster.
Go
32
star
10

programming-erlang-code

erlang codes in "Programming Erlang" http://pragprog.com/book/jaerlang/programming-erlang
Erlang
21
star
11

healthchecks

tiny healthcheck library for akka-http with Kubernetes liveness/readiness probe support
Scala
20
star
12

packer-mesos

Bake your own Mesos(http://mesos.apache.org) pre-installed virtual machine images.
Ruby
19
star
13

rxscalaz

some useful type class instances for Observable
Scala
13
star
14

dbt-models-metadata

Extension package for dbt to build a metadata table for your dbt models along side your models.
Makefile
12
star
15

banditsbook-scala

Scala implementations of standard algorithms for Multi-Armed Bandits Problem.
Scala
12
star
16

ring-benchmark-in-akka

This is another implementation in Akka of http://github.com/everpeace/ring-benchmark .
Scala
10
star
17

composing-monads

monads can compose when distributive law exists.
Scala
10
star
18

helm-charts

my public helm chart repository
Smarty
9
star
19

scalamata

Automata in Scala
Scala
9
star
20

string-score

string-score is a port of Joshaven Potter's string_score to Java.
Java
8
star
21

concourse-github-flow

sample pipeline of concourse ci for projects applying github-flow
Shell
7
star
22

constructr-redis

This library enables to use Redis as cluster coordinator in a ConstructR based cluster
Scala
6
star
23

dotfiles

dotfiles
Shell
6
star
24

aws-kms-resource

Concourse CI resource for decrypting your secrets by AWS Key Management Service
Shell
6
star
25

asdf-docker-slim

docker-slim plugin for asdf version manager
Shell
6
star
26

docker-chainer

all-in-one chainer docker image for instant distributed machine learning (chainer/chainermn/CUPY/CUDA/CuDNN/NCCL2/OpenMPI)
Shell
5
star
27

scala-galois

Galois Field Arithmetic Library in Scala.
Scala
5
star
28

kube-zookeeper

Makefile
5
star
29

bk-tree

implementation of bk-tree, which provides effective search in a given metric space.
Java
5
star
30

go-actor

far far incomplete actor implementation in golang. This is only for my golang learning.
Go
5
star
31

ring-benchmark

This is my solution for the "Ring Benchmark" exercise in "Programming in Erlang".
Erlang
5
star
32

observable-canbe-monad

try to verify Observable, in RxJava, can be a Monad.
Scala
4
star
33

minwise-lsh

an implementation of locality sensitive hash using min-wise permutation family.
Java
4
star
34

scala-bikleisli

BiKleisli Arrow in Scala using Scalaz
Scala
4
star
35

ts-analysis-by-R

private reading and exercise notes of "Rγ«γ‚ˆγ‚‹ζ™‚η³»εˆ—εˆ†ζžε…₯ι–€"
R
4
star
36

bloom-filter

This is an implementation of Bloom Filter, especially CountingBloomFilter.
Scala
4
star
37

word2vec-jawiki

Tool to build word embeddings with word2vec from japanese wikipedia dump data
Shell
4
star
38

ring_benchmark_in_elixir

This is another implementation in Elixir of http://github.com/everpeace/ring-benchmark
Elixir
3
star
39

k8s-leader-elector

Go
3
star
40

docker-curl-jq

ubuntu-slim based curl + jq box
Dockerfile
3
star
41

kubectl-pecologs

'kubectl logs' for multiple pods/containers + peco
Shell
2
star
42

faceted-values

faceted values: a strong primitive for privacy sensitive values
Haskell
2
star
43

CommonRegexScala

CommonRegex port for Scala
Scala
2
star
44

scaldingla

linear algebra algorithms in scalding
Scala
2
star
45

maven-repository

everpeace personal maven repository
1
star
46

vagrant-cassandra

vagrant configuration for cassandra cluster
Ruby
1
star
47

gitsshm

gitsshm: GIT_SSH Manager.
1
star
48

akka-exp

custom load balancer by akka
Scala
1
star
49

homebrew-ssh-agent-filter

ssh-agent-filter homebrew tap repository for macOS.
Ruby
1
star
50

easymock-junit4-rule

JUnit4's rule injecting EasyMock objects using annotations.
1
star
51

k8s-dumb-device-plugin

learning k8s device plugin
Go
1
star
52

mesos-driver-enters-zombie

This can reproduce the issue that MesosSchedulerDriver enters zombie state even after it stopped normally.
Scala
1
star
53

field-type-resolver

a utility which resolve an actual type of a given field in a given class hierarchy.
1
star
54

throttolable-perf-consumer

Scala
1
star
55

dining-philosophers

dining philosophers on alloy
1
star
56

chainer-operator-proto

prototype of chainer-operator for kubernetes
Shell
1
star
57

merkle-tree

[UNDER CONSTRUCTION] This is an implementation of Merkle-Tree.
1
star
58

monad-from-applicative

Verifying that Traversable and Monoid Functor can be a Mond.
Haskell
1
star