export interface KubectlResult { code: number; stdout: string; stderr: string; /** The kubectl binary was not found. */ missing?: boolean; } /** Runs `kubectl`; replaced by a fake in tests. */ export interface KubectlRunner { run(args: readonly string[], options?: { input?: string; timeoutMs?: number; }): Promise; } /** The real `kubectl` on PATH. */ export declare function spawnKubectl(env: Readonly>, binary?: string): KubectlRunner; /** * kubectl bound to one context: every call passes `--context`, so the current context is * never used. */ export interface Kube { context: string; run(args: readonly string[], options?: { input?: string; timeoutMs?: number; }): Promise; /** Run and fail with a CliError naming `what` on a non-zero exit. */ check(what: string, args: readonly string[], options?: { input?: string; timeoutMs?: number; }): Promise; /** `get -o json`; undefined when the object does not exist. */ getJson(args: readonly string[]): Promise; /** `apply --server-side` of manifests. */ apply(what: string, manifests: readonly object[]): Promise; } export declare function kube(runner: KubectlRunner, context: string): Kube; /** The kubeconfig's contexts (`kubectl config get-contexts -o name`). */ export declare function contexts(runner: KubectlRunner): Promise;