prow/kube/cluster.go
func GetKubernetesClient(masterURL, kubeConfig string) (kubernetes.Interface, error) {
	config, err := loadClusterConfig(masterURL, kubeConfig)
	if err != nil {
		return nil, err
	}

	// generate the client based off of the config
	client, err := kubernetes.NewForConfig(config)
	if err != nil {
		return nil, err
	}

	logrus.Info("Successfully constructed k8s client")
	return client, nil
}
func GetKubernetesClient(masterURL, kubeConfig string) (kubernetes.Interface, error) {
	config, err := loadClusterConfig(masterURL, kubeConfig)
	if err != nil {
		return nil, err
	}

	// generate the client based off of the config
	client, err := kubernetes.NewForConfig(config)
	if err != nil {
		return nil, err
	}

	logrus.Info("Successfully constructed k8s client")
	return client, nil
}
func GetKubernetesClient ( masterURL , kubeConfig string ) ( kubernetes . Interface , error ) { config , err := loadClusterConfig ( masterURL , kubeConfig ) if err != nil { return nil , err } // generate the client based off of the config client , err := kubernetes . NewForConfig ( config ) if err != nil { return nil , err } logrus . Info ( " " ) return client , nil }
// GetKubernetesClient retrieves the Kubernetes cluster
// client from within the cluster
GetKubernetesClient retrieves the Kubernetes cluster client from within the cluster