{"id":21100299,"url":"https://github.com/pscheidl/rust-kubernetes-operator-example","last_synced_at":"2025-04-04T10:06:48.836Z","repository":{"id":36997542,"uuid":"354296656","full_name":"Pscheidl/rust-kubernetes-operator-example","owner":"Pscheidl","description":"An example of a Kubernetes operator implemented in Rust","archived":false,"fork":false,"pushed_at":"2024-12-24T17:18:49.000Z","size":6513,"stargazers_count":179,"open_issues_count":0,"forks_count":28,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-28T09:06:24.684Z","etag":null,"topics":["kubernetes","kubernetes-operator","rust"],"latest_commit_sha":null,"homepage":"","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/Pscheidl.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-04-03T13:16:38.000Z","updated_at":"2025-02-21T01:12:11.000Z","dependencies_parsed_at":"2024-08-15T11:58:37.280Z","dependency_job_id":"7e9846fc-519f-4389-bea8-f9389929b332","html_url":"https://github.com/Pscheidl/rust-kubernetes-operator-example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pscheidl%2Frust-kubernetes-operator-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pscheidl%2Frust-kubernetes-operator-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pscheidl%2Frust-kubernetes-operator-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pscheidl%2Frust-kubernetes-operator-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pscheidl","download_url":"https://codeload.github.com/Pscheidl/rust-kubernetes-operator-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247157107,"owners_count":20893214,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["kubernetes","kubernetes-operator","rust"],"created_at":"2024-11-19T23:09:27.146Z","updated_at":"2025-04-04T10:06:48.810Z","avatar_url":"https://github.com/Pscheidl.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust Kubernetes operator example\n\n[![Rust](https://github.com/Pscheidl/rust-kubernetes-operator-example/actions/workflows/rust.yml/badge.svg)](https://github.com/Pscheidl/rust-kubernetes-operator-example/actions/workflows/rust.yml)\n\nA Kubernetes operator built on top of [kube-rs](https://github.com/clux/kube-rs) project. There is\nan [explanatory article](https://www.pavel.cool/posts/rust-kubernetes-operators/) available.\n\nSteps to run on Linux:\n\n1. [Install](https://www.rust-lang.org/tools/install) Rust\n1. Install Kubernetes, [K3S.io](https://k3s.io/) is an excellent choice, installed simply\n   with `curl -sfL https://get.k3s.io | sh -`. Make sure to `sudo chown $USER /etc/rancher/k3s/k3s.yaml` if you're\n   accessing the Kubernetes cluster using the kubeconfig at `/etc/rancher/k3s/k3s.yaml` as non-root user.\n   Also, `export KUBECONFIG=/etc/rancher/k3s/k3s.yaml`, so the operator can find the kubeconfig.\n1. Use `kubectl apply -f echoes.example.com.yaml` to create the CustomResourceDefinition inside Kubernetes.\n1. Build the project with `cargo build`. If the build fails, make sure `libssl-dev` is available.\n1. Run the operator using `cargo run`. It will run outside of the Kubernetes cluster and connect to the Kubernetes REST\n   API using the account inside the `KUBECONFIG` automatically.\n\nFinally, a custom `Echo` resource can be created with `kubectl apply -f echo-example.yaml`. A new deployment of two pods\nwith `Echo` REST API service will be created. This can be checked with the `kubectl get pods`\nor `kubectl get deployments` command.\n\n![Usage showcase](showcase.gif)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpscheidl%2Frust-kubernetes-operator-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpscheidl%2Frust-kubernetes-operator-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpscheidl%2Frust-kubernetes-operator-example/lists"}