kube-arch-scheduler

Kubernetes Architecture Scheduler Plugin

An image architecture aware Kubernetes scheduler plugin

kube-arch-scheduler is a kubernetes scheduler filter plugin that will filter nodes by the compatibility of the container image architectures (platforms) present in a Pod.

Deploy - Helm

helm repo add kube-arch-scheduler https://jatalocks.github.io/kube-arch-scheduler/
helm repo update
helm install -n kube-system kube-arch-scheduler/kube-arch-scheduler

Core Values:

controllerManager:
  manager:
    image:
      repository: ghcr.io/jatalocks/kube-arch-scheduler
      tag: latest
    resources:
      requests:
        cpu: 0.5
        memory: 100Mi
  replicaCount: 1

# While enabled, this will add the scheduler to the default scheduler plugins,
# this will make it affect all pods in the cluster.
addToDefaultScheduler: true

# If addToDefaultScheduler if false, this will be the name of the scheduler,
# and it will only affect pods with: [schedulerName: kube-arch-scheduler].
nonDefaultSchedulerName: kube-arch-scheduler

# The weight of each architecture,
# if a pod can sit on both, it will prefer the one with the higher weight.
# The default weight of undefined architectures is 0, meaning none will have
# any particular preference.
weight:
  amd64: 0
  arm64: 0
  arm: 0
  ppc64le: 0
  s390x: 0
  riscv64: 0

Development

Use this command to run the scheduler locally while connected to your Kubernetes cluster’s context:

go run main.go --authentication-kubeconfig ~/.kube/config --authorization-kubeconfig ~/.kube/config --config=./example/scheduler-config.yaml --v=2

You can use the example deployment in order to test the scheduler on a live pod:

kubectl deploy -f example/busybox.yaml

Support

Buy Me A Coffee