// NewKubeConfig generates a Kubernetes configuration (e.g. for kubectl to use)
// from the provided machines, and places it in the provided directory.
NewKubeConfig generates a Kubernetes configuration
from the provided machines, and places it in the provided directory.
// NewKubeConfig generates a Kubernetes configuration ( e . g . for kubectl to use ) // from the provided machines and places it in the provided directory .
func NewKubeConfig(artifactDirectory string, machines []*clusterv1.Machine) (string, error) {
	master := machine.FirstMaster(machines)
	if master == nil {
		return "", errors.New("at least one master node is required to create a Kubernetes configuration file")
	}
	config, err := machine.Config(master)
	if err != nil {
		return "", err
	}
	return path.WKSResourcePath(artifactDirectory, config.Address), nil
}
func NewKubeConfig ( artifactDirectory string , machines [ ] * clusterv1 . Machine ) ( string , error ) { master := machine . FirstMaster ( machines ) if master == nil { return " " , errors . New ( " " ) } config , err := machine . Config ( master ) if err != nil { return " " , err } return path . WKSResourcePath ( artifactDirectory , config . Address ) , nil }
NewKubeConfig generates a Kubernetes configuration
from the provided machines, and places it in the provided directory.
NewKubeConfig generates a Kubernetes configuration from the provided machines and places it in the provided directory .