Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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.
Click to show internal directories.
Click to hide internal directories.