code: func createClients(config componentbaseconfig.ClientConnectionConfiguration, masterOverride string, timeout time.Duration) (clientset.Interface, clientset.Interface, v1core.EventsGetter, error) {
  	if len(config.Kubeconfig) == 0 && len(masterOverride) == 0 {
  		klog.Warningf("Neither --kubeconfig nor --master was specified. Using default API client. This might not work.")
  	}
  
  	// This creates a client, first loading any specified kubeconfig
  	// file, and then overriding the Master flag, if non-empty.
  	kubeConfig, err := clientcmd.NewNonInteractiveDeferredLoadingClientConfig(
  		&clientcmd.ClientConfigLoadingRules{ExplicitPath: config.Kubeconfig},
  		&clientcmd.ConfigOverrides{ClusterInfo: clientcmdapi.Cluster{Server: masterOverride}}).ClientConfig()
  	if err != nil {
  		return nil, nil, nil, err
  	}
  
  	kubeConfig.AcceptContentTypes = config.AcceptContentTypes
  	kubeConfig.ContentType = config.ContentType
  	kubeConfig.QPS = config.QPS
  	//TODO make config struct use int instead of int32?
  	kubeConfig.Burst = int(config.Burst)
  
  	client, err := clientset.NewForConfig(restclient.AddUserAgent(kubeConfig, "scheduler"))
  	if err != nil {
  		return nil, nil, nil, err
  	}
  
  	// shallow copy, do not modify the kubeConfig.Timeout.
  	restConfig := *kubeConfig
  	restConfig.Timeout = timeout
  	leaderElectionClient, err := clientset.NewForConfig(restclient.AddUserAgent(&restConfig, "leader-election"))
  	if err != nil {
  		return nil, nil, nil, err
  	}
  
  	eventClient, err := clientset.NewForConfig(kubeConfig)
  	if err != nil {
  		return nil, nil, nil, err
  	}
  
  	return client, leaderElectionClient, eventClient.CoreV1(), nil
  }
docs: // createClients creates a kube client and an event client from the given config and masterOverride.
  // TODO remove masterOverride when CLI flags are removed.