{"id":39386241,"url":"https://github.com/acrlabs/kube-scheduler-rs-reference","last_synced_at":"2026-01-18T03:03:35.906Z","repository":{"id":188967548,"uuid":"667500625","full_name":"acrlabs/kube-scheduler-rs-reference","owner":"acrlabs","description":"A reference implementation of a Kubernetes scheduler written in Rust","archived":false,"fork":false,"pushed_at":"2024-03-04T21:53:43.000Z","size":81,"stargazers_count":11,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-01-15T15:38:12.375Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/acrlabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-17T16:39:19.000Z","updated_at":"2024-02-02T17:13:46.000Z","dependencies_parsed_at":"2023-08-17T18:00:02.445Z","dependency_job_id":null,"html_url":"https://github.com/acrlabs/kube-scheduler-rs-reference","commit_stats":null,"previous_names":["acrlabs/kube-scheduler-rs-reference"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/acrlabs/kube-scheduler-rs-reference","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acrlabs%2Fkube-scheduler-rs-reference","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acrlabs%2Fkube-scheduler-rs-reference/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acrlabs%2Fkube-scheduler-rs-reference/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acrlabs%2Fkube-scheduler-rs-reference/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/acrlabs","download_url":"https://codeload.github.com/acrlabs/kube-scheduler-rs-reference/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/acrlabs%2Fkube-scheduler-rs-reference/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28528026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-18T00:39:45.795Z","status":"online","status_checked_at":"2026-01-18T02:00:07.578Z","response_time":98,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-18T03:03:35.787Z","updated_at":"2026-01-18T03:03:35.883Z","avatar_url":"https://github.com/acrlabs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kube-scheduler-rs reference implementation\n\nA \"reference\" implementation for building a Kubernetes scheduler in Rust.  This is not intended as a replacement for the\nreal Kubernetes scheduler, nor should it be used in any sort of production environment, but it does do an _extremely\nbasic_ job of scheduling pods onto nodes in a Kubernetes cluster.\n\n## How does it work?\n\nThe reference implementation relies on the [kube-rs/kube](https://github.com/kube-rs/kube) crate to interact with the\nKubernetes API, as well as the [k8s-openapi](https://github.com/Arnavion/k8s-openapi) crate for the various Kubernetes\nAPI objects.  It sets up a controller that watches `Unschedulable` Pods and all Nodes in the cluster.  When an\nunschedulable pod arrives, it will randomly try to pick (up to) five nodes in the cluster, checking CPU and memory\nconstraints, as well as `nodeSelector` constraints for each.  If it finds one that succeeds, it will create a binding\nfor the pod to the node.  Otherwise, it will return an error and try again later.\n\nNote that because the scheduler is checking only a _tiny fraction_ of the possible scheduling constraints that\nKubernetes provides, so it is _highly likely_ that the pod binding will fail in any sort of \"real\" cluster.\n\n## Why, though?\n\nMainly this was intended as an exercise in learning more about the `kube` Rust crate and the surrounding ecosystem, as\nwell as to demonstrate that building a Kubernetes scheduler in Rust is _possible_.  Whether it's a good idea remains to\nbe seen.\n\n## Development\n\nTo run the scheduler: `cargo run`.  Note that you don't need to run this in a pod inside your cluster as long as you\nhave a kubeconfig in a standard location with cluster admin privileges.\n\nTo run the tests: `cargo test`.  Note that we have laughably low test coverage.\n\nWe do use `pre-commit` in this repo to check formatting and linting.  Install\n[pre-commit](https://pre-commit.com/#plugins) here, and then run `pre-commit install` to configure the hooks.\n\n## Contributing\n\nI don't really expect to do any more on this project, but if you want to extend it, or you find things that I've done\nthat could be better, I'll happily accept PRs.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facrlabs%2Fkube-scheduler-rs-reference","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Facrlabs%2Fkube-scheduler-rs-reference","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Facrlabs%2Fkube-scheduler-rs-reference/lists"}