Giter VIP home page Giter VIP logo

rust-kubernetes-operator-example's Introduction

Rust Kubernetes operator example

Rust

A Kubernetes operator built on top of kube-rs project. There is an explanatory article available.

Steps to run on Linux:

  1. Install Rust
  2. Install Kubernetes, K3S.io is an excellent choice, installed simply with curl -sfL https://get.k3s.io | sh -. Make sure to sudo chown $USER /etc/rancher/k3s/k3s.yaml if you're accessing the Kubernetes cluster using the kubeconfig at /etc/rancher/k3s/k3s.yaml as non-root user. Also, export KUBECONFIG=/etc/rancher/k3s/k3s.yaml, so the operator can find the kubeconfig.
  3. Use kubectl apply -f echoes.example.com.yaml to create the CustomResourceDefinition inside Kubernetes.
  4. Build the project with cargo build. If the build fails, make sure libssl-dev is available.
  5. Run the operator using cargo run. It will run outside of the Kubernetes cluster and connect to the Kubernetes REST API using the account inside the KUBECONFIG automatically.

Finally, a custom Echo resource can be created with kubectl apply -f echo-example.yaml. A new deployment of two pods with Echo REST API service will be created. This can be checked with the kubectl get pods or kubectl get deployments command.

Usage showcase

rust-kubernetes-operator-example's People

Contributors

pscheidl avatar reinvantveer avatar pkozelka avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.