kubernetes

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewClient

func NewClient(config *rest.Config) (kubernetes.Interface, error)

NewClient creates a new Kubernetes client from a REST configuration.

Types

type RestConfigInfo

type RestConfigInfo struct {
	Config  *rest.Config
	Source  string // Human-readable description of the kubeconfig source
	Context string // Active Kubernetes context name
}

RestConfigInfo contains the REST config, its source, and the active context.

func NewRestConfig

func NewRestConfig() (RestConfigInfo, error)

NewRestConfig creates a Kubernetes REST client configuration. It attempts to load the configuration from: 1. KUBECONFIG environment variable 2. ~/.kube/config (default kubeconfig location) 3. In-cluster configuration (when running in a pod)

Returns the config, a description of which source was used, and the active context.

Jump to

Keyboard shortcuts

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