code: func WriteStaticPodToDisk(componentName, manifestDir string, pod v1.Pod) error {
  
  	// creates target folder if not already exists
  	if err := os.MkdirAll(manifestDir, 0700); err != nil {
  		return errors.Wrapf(err, "failed to create directory %q", manifestDir)
  	}
  
  	// writes the pod to disk
  	serialized, err := util.MarshalToYaml(&pod, v1.SchemeGroupVersion)
  	if err != nil {
  		return errors.Wrapf(err, "failed to marshal manifest for %q to YAML", componentName)
  	}
  
  	filename := kubeadmconstants.GetStaticPodFilepath(componentName, manifestDir)
  
  	if err := ioutil.WriteFile(filename, serialized, 0600); err != nil {
  		return errors.Wrapf(err, "failed to write static pod manifest file for %q (%q)", componentName, filename)
  	}
  
  	return nil
  }
docs: // WriteStaticPodToDisk writes a static pod file to disk