class KubectlRawRestClient
implements RestClient
Re-export
import { KubectlRawRestClient } from "https://deno.land/x/kubernetes_apis@v0.5.3/deps.ts";
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.
Deno flags to use this client: --allow-run=kubectl
Pro: Any valid kubeconfig will be supported automatically :) Con: In particular, these features aren't available:
- Setting or receiving HTTP headers
- HTTP methods such as PATCH and HEAD
- Fully-detailed error payloads
- Differentiating successful & quiet stream vs stalled stream setup
Methods
private
emulateExecTunnel(): Promise<KubernetesTunnel>performRequest(opts: RequestOptions): Promise<any>
runKubectl(args: string[], opts: { abortSignal?: AbortSignal; bodyRaw?: Uint8Array; bodyJson?: JSONValue; bodyStream?: ReadableStream<Uint8Array>; bodyPassthru?: boolean; })