kubectl

package
v0.6.0-rc0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 4, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package kubectl provides helpers for running kubectl commands with the correct KUBECONFIG environment variable set. It centralises the pattern that was previously duplicated across network, x402, model, agent, and cmd/obol packages.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Apply

func Apply(binary, kubeconfig string, data []byte) error

Apply pipes the given data into kubectl apply -f -.

func EnsureCluster

func EnsureCluster(cfg *config.Config) error

EnsureCluster checks that the kubeconfig file exists, returning a descriptive error when the cluster is not running.

func Output

func Output(binary, kubeconfig string, args ...string) (string, error)

Output executes kubectl and returns the captured stdout. Stderr is captured and included in the returned error on failure.

func Paths

func Paths(cfg *config.Config) (binary, kubeconfig string)

Paths returns the absolute paths to the kubectl binary and kubeconfig.

func Run

func Run(binary, kubeconfig string, args ...string) error

Run executes kubectl with the given arguments, inheriting stdout and capturing stderr. The error message includes stderr output on failure.

func RunSilent

func RunSilent(binary, kubeconfig string, args ...string) error

RunSilent executes kubectl without inheriting stdout. Stderr is captured and included in the returned error on failure.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL