code: func WriteKubeletDynamicEnvFile(cfg *kubeadmapi.ClusterConfiguration, nodeReg *kubeadmapi.NodeRegistrationOptions, registerTaintsUsingFlags bool, kubeletDir string) error {
  	hostName, err := nodeutil.GetHostname("")
  	if err != nil {
  		return err
  	}
  
  	flagOpts := kubeletFlagsOpts{
  		nodeRegOpts:              nodeReg,
  		featureGates:             cfg.FeatureGates,
  		pauseImage:               images.GetPauseImage(cfg),
  		registerTaintsUsingFlags: registerTaintsUsingFlags,
  		execer:                   utilsexec.New(),
  		pidOfFunc:                procfs.PidOf,
  		defaultHostname:          hostName,
  	}
  	stringMap := buildKubeletArgMap(flagOpts)
  	argList := kubeadmutil.BuildArgumentListFromMap(stringMap, nodeReg.KubeletExtraArgs)
  	envFileContent := fmt.Sprintf("%s=%q\n", constants.KubeletEnvFileVariableName, strings.Join(argList, " "))
  
  	return writeKubeletFlagBytesToDisk([]byte(envFileContent), kubeletDir)
  }
docs: // WriteKubeletDynamicEnvFile writes an environment file with dynamic flags to the kubelet.
  // Used at "kubeadm init" and "kubeadm join" time.