/x/kubernetes_apis
Generated, typed interfaces to make every possible Kubernetes API request and work with richer data structures.
The actual request transports are implemented in /x/kubernetes_client
.
Here's a basic request, listing all Pods in the default
namespace.
It uses the autoDetectClient()
entrypoint which returns the first usable client.
import { autoDetectClient } from 'https://deno.land/x/kubernetes_client@v0.7.0/mod.ts'; import { CoreV1Api } from 'https://deno.land/x/kubernetes_apis/builtin/core@v1/mod.ts'; const kubernetes = await autoDetectClient(); const coreApi = new CoreV1Api(kubernetes).namespace("default"); const podList = await coreApi.getPodList(); console.log(podList); // see files in examples/ for more API demos (watching, creation, etc)
When running locally (with kubectl
set up), you probably just to add --allow-run=kubectl
to run this.
For a container being deployed onto a cluster, there's more flags to provide instead;
see /x/kubernetes_client
for more information.
v0.5.2
on 2024-09-28
:
v1.30.4
.
ValidatingAdmissionPolicy
, ServiceCIDR
, ResourceSlice
cert-manager
, argo-cd
, external-dns
, and vpa
CRDs have been updated.v0.5.1
on 2024-09-18
:
/x/kubernetes_client
API contract to v0.7.3
.v0.5.0
on 2023-08-19
:
/x/kubernetes_client
API contract to v0.7.0
.v1.28.0
.
admissionregistration.k8s.io/v1beta1
, certificates.k8s.io/v1alpha1
.SelfSubjectReview
.{}
instead of JSONValue
.v0.4.0
on 2023-02-10
:
/x/kubernetes_client
API contract to v0.5.0
.v1.26.1
.
cert-manager
CRDs have been updated. Removes v1beta1, v1alpha3, and v1alpha2 APIs.argo-cd
CRDs have been updated. Adds a new ApplicationSet
CRD.
streamPodLogs
to allow fetching pod logs as a ReadableStream<string>
.v0.3.2
on 2021-12-02
:
/x/kubernetes_client
API contract to v0.3.2
.v1.22.4
.
v1beta1
API versions were removed in favor of stable v1
APIs.cert-manager
and external-dns
CRDs have been updated from the latest releases.argo-cd
.v0.3.1
on 2021-05-09
:
/x/kubernetes_client
API contract to v0.2.4
.v1.21.0
.
get
functions no longer accept export
or exact
.cert-manager
and external-dns
CRDs have been updated from the latest releases.v0.3.0
on 2021-02-28
:
/x/kubernetes_client
API contract to v0.2.0
.
autoDetectClient
and other client APIs from this common.ts
,
those now come from client.ts
instead
(or just import /x/kubernetes_client
yourself).examples/
.v0.2.0
on 2020-12-29
:
v1.20
./x/kubernetes_client
API contract to v0.1.2
./x/kubernetes_client
.v1
and external-dns's CRDs also added.v0.1.0
on 2020-11-17
:
v1.19
./x/kubernetes_client