Skip to content

slinkydeveloper/extending-kubernetes-api-in-process-poc

Repository files navigation

Extending Kubernetes API in-process

Project structure:

Build

To build the memcached example controller:

cd ext-memcached
cargo build --target wasm32-wasi --release

Assuming you have a Kubernetes cluster up and running and you have an admin access to it configured in your local environment, deploy the CRD:

kubectl apply -f ext-memcached/crd.yaml

Now, copy in a directory (eg rust-host/compiled_mods) the compiled module and the manifest the host needs to identify the abi to use:

mkdir rust-host/compiled_mods
cp ext-memcached/memcached.yaml rust-host/compiled_mods
cp ext-memcached/wasm32-wasi/release/memcached.wasm rust-host/compiled_mods

To compile and run the host:

cd rust-host
RUST_LOG=rust_host=debug,cranelift=warn,kube=debug cargo +nightly run compiled_mods

Now you can create the Memcached CR with:

kubectl apply -f ext-memcached/cr.yaml

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages