Clojure client for Kubernetes API
Start kubernetes proxy on localhost:8080
The client can be used as follows:
(ns example
(:require [clojure-kubernetes-client.core :as core]
[clojure-kubernetes-client.api.core-v1 :refer [list-node create-namespace]]))
;; Set end-point for the the client
(core/set-api-context {:base-url "http://localhost:8080"})
;; List nodes
(list-node)
;; Create a new namespace
(create-namespace {:metadata {:name "a"}})
The client is autogenerated using openapi-generator for the API spec fetched from kubernetes repository.
To modify/upgrade the client to a different kubernetes version, change KUBERNETES_BRANCH
in settings and run ./scripts/clojure.sh
to autogenerate the client-source code.
Can you improve this documentation?Edit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close