A native OCaml 5 client and controller runtime for Kubernetes®.
The current release is v0.1.2. The public API is usable, but may still evolve between minor releases while the project is in the 0.x series.
OCaml 5.1 or newer and OPAM are required. Install the released package with:
opam install kubeThe OPAM package installs the kube libraries and the ocaml-kube scaffolding command.
To build the development checkout with its tests and API documentation:
opam install . --deps-only --with-test --with-doc
opam exec -- dune build @all @install @doc @codegen-check
opam exec -- dune runtestSee Getting started for client setup, a typed request, and the local integration example.
Library | Purpose |
|---|---|
| Configuration, transport, clients, discovery, caching, and controllers |
| Versioned generated Kubernetes APIs |
| Typed custom resources and CRD generation |
| JSON codec and structural schema derivation |
| Deterministic client and controller testing |
Guide | Covers |
|---|---|
Build, configuration, and first request | |
Typed, dynamic, subresource, and streaming clients | |
Protected credentials, bodies, Secret writes, and TokenRequest | |
Reconciliation, caching, watches, and leadership | |
Owned children, apply, retries, conditions, metrics, and tests | |
Logging, health, metrics, diagnostics, and events | |
Supported Kubernetes versions and feature floor | |
API packages, versioning, and regeneration | |
CRD schemas, codecs, and typed resources | |
OCaml-first generation and CRD import | |
Exec, attach, and port forwarding | |
Admission, conversion, and TLS serving | |
Scripted transports and integration boundaries | |
Current parity, honest gaps, and priorities | |
Strengths, tradeoffs, and when to choose it |
Release history is in CHANGES.md. See CONTRIBUTING.md, SECURITY.md, and the release checklist for project processes.
Licensed under Apache-2.0.