Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/kubernetes_apis/deps.ts

REST focused Typescript classes for Kubernetes APIs, and tools for generating API interfaces
Latest
import * as kubernetesApis from "https://deno.land/x/kubernetes_apis@v0.5.1/deps.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.

Extension of KubeConfigRestClient, adding tunnel support via WebSocketStream. WebSockets have various limits within the Kubernetes and Deno ecosystem, but they work quite well in several situations and have good backpressure support.

Handles an individual WebSocket connection to the Kubernetes API. Kubernetes WebSockets support up to 255 indexed bytestreams. To send or receive data, you must first provide the channel's index, and then streams will be returned for that particular index.

Validates JSON objects belonging to a watch stream

Functions

Automatic trial-and-error approach for deciding how to talk to Kubernetes. Influenced by Deno's current permissions and Deno may prompt for more permissions. Will emit a list of problems if no usable clients are found. You'll likely want to set the correct Deno permissions for your installation.

Constructs the typical list of Kubernetes API clients, using an alternative client for connecting to KubeConfig contexts. The Kubectl client is unaffected by this.

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.