# atlibs-kube Moved: this crate is `transports/kube` in [atlibs](https://knotless.dev/johnandersen777.bsky.social/atlibs), one commit with the host. This repository is frozen; its pins are not kept. Kubernetes (and kcp) API calls and watches for [atlibs](https://knotless.dev/johnandersen777.bsky.social/atlibs) hosts: a transport on atlibs-host's seam. | NSID | what | | --- | --- | | `com.fedfork.exec.kube.get`, `.list` | `{cluster, apiVersion, kind, name?, namespace?, plural?, labelSelector?}` | | `com.fedfork.exec.kube.apply` | server-side apply of `object` or `yaml` (documents); `dryRun` | | `com.fedfork.exec.kube.patch`, `.delete` | merge `patch`; only objects the run created, or what the host's guard allows | | `com.fedfork.exec.kube.raw` | GET `{cluster, path}` under the server's path (`/readyz`): `{status, text}` | | `com.fedfork.exec.kube.watch` | subscription: `{type: apply\|delete\|synced, object}` per change | The host names each cluster: a kubeconfig, the `/clusters/` path of a kcp, and how to reach it (`direct`, `overlay`, `ssh` forward, `iroh` via atlibs-iroh's raw `dumbpipe connect`, `proxy` command). A module names the cluster, never a credential. `cleanup()` after the run: patched specs restored, created objects deleted. ## Use Link it into a Rust host (Cargo.lock from this repo pins the rest): ```bash run root=$PWD app=$(mktemp -d) cp Cargo.lock "$app" && cd "$app" && cargo init -q --name app cat >> Cargo.toml <<'EOF' atlibs-host = { git = "https://knotless.dev/johnandersen777.bsky.social/atlibs", rev = "9f1b5ad089faa528b07b49d75965d54535a70e11" } atlibs-kube = { git = "https://knotless.dev/johnandersen777.bsky.social/atlibs-kube", rev = "f37afdc32cde55062f667bad2dc2765085afb558" } EOF cat > src/main.rs <<'EOF' fn main() { let kube = atlibs_kube::Kube::new(Default::default(), None); let _transport = kube.transport(); println!("{}", kube.clusters()); } EOF cargo run -q cd "$root" ``` ```output {} ```