Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfigFromHostWithCertData ¶
func GetConfigFromHostWithCertData(kubeconfigPath string, allowedContexts []string) (clientcmd.ClientConfig, error)
GetConfigFromHostWithCertData gets the kubeconfig using default options set on the host: the kubeconfig can either be retrieved from a specified path or an environment variable. This function only outputs a clientcmd that uses the allowedContexts.
This function also populates all of the certificate data that's specified as a filepath.
func GetKubeconfigFromHost ¶
GetKubeconfigFromHost returns the kubeconfig for a list of contexts using default options set on the host, or an explicit kubeconfig path. It then strips the kubeconfig of contexts not specified in the contexts array, and returns generate kubeconfig.
func ResolveKubeconfigPath ¶
ResolveKubeconfigPath finds the path to a kubeconfig, first searching for the passed string, then in the home directory, then as an env variable.
Types ¶
This section is empty.