Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/kubernetes_apis/client.ts

REST focused Typescript classes for Kubernetes APIs, and tools for generating API interfaces
Go to Latest
import * as kubernetesApis from "https://deno.land/x/kubernetes_apis@v0.3.2/client.ts";

Classes

Parses individual JSON objects from individual strings, 1:1

A RestClient which uses a KubeConfig to talk directly to a Kubernetes endpoint. Used by code which is running within a Kubernetes pod and would like to access the local cluster's control plane using its Service Account.

A RestClient for easily running on a developer's local machine. Your existing kubectl is called to do all the actual authentication and network stuff. This is pretty reliable but mot all types of requests can be performed this way.

Reassembles newline-deliminited data from byte chunks into decoded text strings

Validates JSON objects belonging to a watch stream

Functions

Trial-and-error approach for automatically deciding how to talk to Kubernetes. You'll still need to set the correct permissions for where you are running. You can probably be more specific and secure with app-specific Deno.args flags.

Paginates through an API request, yielding every individual item returned

Paginates through an API request, yielding each successive page as a whole

Type Aliases

Implementation of a Kubernetes List/Watch client which furnishes a view of the watched data. This is commonly called a 'Reflector' among the client libraries, though this one is less standard.