A set of Clojure libraries for interacting with Kubernetes from Clojure applications. Composed of a core Kubernetes client + various modules offering higher level constructs (sometimes with added dependencies).
Some Clojure Kubernetes libraries already exist, but they're not comprehensive. I want something robust enough that I can write production cluster integrations (controllers, operators, etc) in Clojure. I really enjoy the data orientation that you find in other Clojure libraries like cognitect's aws-api and have tried to provide the same here.
The fabric8.io kubernetes client for java is robust, but it's painful to use from Clojure due to its focus on OOP ergonomics. That said, the fabric8 implementation has been my primary reference when implementing the trickier pieces of IO.
This module bundles all modules (described below) for ease of use.
This implements the basic REST and websocket client code to communicate with the Kubernetes API. It defines the available operations using the swagger specification served from the remote Kubernetes cluster. You can use this to CRUD on Kubernetes resources and to explore the available operations.
Note that this core is intentionally minimal. All interactions with Kubernetes boil down to either some http calls or
some websocket connections and that's all this module provides. If you're looking for more complex things like
exec
and port-forward
have a look at the kube-api-io module that creates those things from these
blocks.
Inspired by:
Leverages:
This implements higher level IO constructs like those you're accustomed to from kubectl. This is where you'll find
things like exec
, attach
, logs
, port-forward
, proxy
, and cp
.
Leverages:
This satisfies the same goals as the tools/cache package from the standard go client. Provides machinery for writing controllers (aka operators) that manages threads, watches, retries, and state for you so that your user space controller implementation doesn't need to worry about so many details.
Inspired by:
Leverages:
This module provides tooling to help write tests that can interact with an isolated kubernetes cluster using kind. This module is used to test kube-api itself.
This project is licensed under MIT license.