Documentation ¶
Index ¶
- func GetConfigWithContext(kubeConfigPath, kubeContext string) (*rest.Config, error)
- func GetScheme() *runtime.Scheme
- func NewClient(config *rest.Config, options Options) (client.Client, error)
- func NewClientFromKubeConfigAndContext(kubeConfigPath, kubeContext string) (client.Client, error)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigWithContext ¶
GetConfigWithContext returns kubernetes config based on the current environment. If kubeConfigPath is provided, loads configuration from that file. Otherwise, GetConfigWithContext uses default strategy to load configuration from $KUBECONFIG, .kube/config, or just returns in-cluster config.
func NewClient ¶
NewClient returns a new Client using the provided config and Options. The returned client reads *and* writes directly from the server (it doesn't use object caches). It understands how to work with normal types (both custom resources and aggregated/built-in resources), as well as unstructured types.
In the case of normal types, the scheme will be used to look up the corresponding group, version, and kind for the given type. In the case of unstructured types, the group, version, and kind will be extracted from the corresponding fields on the object.