kubeconfig-default-context

command module
v0.0.0-...-3c53a25 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

README

Create config from kubeconfig file using clientcmd.BuildConfigFromFlags()

The example code looks simple, but the internals aren't so simple, actually. clientcmd.BuildConfigFromFlags() under the hood uses the DeferredLoadingClientConfig struct (via NewNonInteractiveDeferredLoadingClientConfig) that implements ClientConfigLoader interface. Such kind of loader is needed to defer the actual config creation util all the possible tweaks (via extra flags and/or env vars) are done. However, since the ExplicitPath is used, neither the deferred loading nor actual merging happens.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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