code: func CreateStaticPodFiles(manifestDir string, cfg *kubeadmapi.ClusterConfiguration, endpoint *kubeadmapi.APIEndpoint, componentNames ...string) error {
  	// TODO: Move the "pkg/util/version".Version object into the internal API instead of always parsing the string
  	k8sVersion, err := version.ParseSemantic(cfg.KubernetesVersion)
  	if err != nil {
  		return err
  	}
  
  	// gets the StaticPodSpecs, actualized for the current ClusterConfiguration
  	klog.V(1).Infoln("[control-plane] getting StaticPodSpecs")
  	specs := GetStaticPodSpecs(cfg, endpoint, k8sVersion)
  
  	// creates required static pod specs
  	for _, componentName := range componentNames {
  		// retrieves the StaticPodSpec for given component
  		spec, exists := specs[componentName]
  		if !exists {
  			return errors.Errorf("couldn't retrieve StaticPodSpec for %q", componentName)
  		}
  
  		// writes the StaticPodSpec to disk
  		if err := staticpodutil.WriteStaticPodToDisk(componentName, manifestDir, spec); err != nil {
  			return errors.Wrapf(err, "failed to create static pod manifest file for %q", componentName)
  		}
  
  		klog.V(1).Infof("[control-plane] wrote static Pod manifest for component %q to %q\n", componentName, kubeadmconstants.GetStaticPodFilepath(componentName, manifestDir))
  	}
  
  	return nil
  }
docs: // CreateStaticPodFiles creates all the requested static pod files.