code: func createClients(config componentbaseconfig.ClientConnectionConfiguration, masterOverride string) (clientset.Interface, v1core.EventsGetter, error) {
  	var kubeConfig *rest.Config
  	var err error
  
  	if len(config.Kubeconfig) == 0 && len(masterOverride) == 0 {
  		klog.Info("Neither kubeconfig file nor master URL was specified. Falling back to in-cluster config.")
  		kubeConfig, err = rest.InClusterConfig()
  	} else {
  		// 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, err
  	}
  
  	kubeConfig.AcceptContentTypes = config.AcceptContentTypes
  	kubeConfig.ContentType = config.ContentType
  	kubeConfig.QPS = config.QPS
  	kubeConfig.Burst = int(config.Burst)
  
  	client, err := clientset.NewForConfig(kubeConfig)
  	if err != nil {
  		return nil, nil, err
  	}
  
  	eventClient, err := clientset.NewForConfig(kubeConfig)
  	if err != nil {
  		return nil, nil, err
  	}
  
  	return client, 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.