code: func MarshalClusterConfigurationToBytes(clustercfg *kubeadmapi.ClusterConfiguration, gv schema.GroupVersion) ([]byte, error) {
  	clusterbytes, err := kubeadmutil.MarshalToYamlForCodecs(clustercfg, gv, kubeadmscheme.Codecs)
  	if err != nil {
  		return []byte{}, err
  	}
  	allFiles := [][]byte{clusterbytes}
  	componentConfigContent := map[string][]byte{}
  	defaultedcfg := defaultedInternalConfig()
  
  	for kind, registration := range componentconfigs.Known {
  		// If the ComponentConfig struct for the current registration is nil, skip it when marshalling
  		realobj, ok := registration.GetFromInternalConfig(clustercfg)
  		if !ok {
  			continue
  		}
  
  		defaultedobj, ok := registration.GetFromInternalConfig(defaultedcfg)
  		// Invalid: The caller asked to not print the componentconfigs if defaulted, but defaultComponentConfigs() wasn't able to create default objects to use for reference
  		if !ok {
  			return []byte{}, errors.New("couldn't create a default componentconfig object")
  		}
  
  		// If the real ComponentConfig object differs from the default, print it out. If not, there's no need to print it out, so skip it
  		if !reflect.DeepEqual(realobj, defaultedobj) {
  			contentBytes, err := registration.Marshal(realobj)
  			if err != nil {
  				return []byte{}, err
  			}
  			componentConfigContent[string(kind)] = contentBytes
  		}
  	}
  
  	// Sort the ComponentConfig files by kind when marshalling
  	sortedComponentConfigFiles := consistentOrderByteSlice(componentConfigContent)
  	allFiles = append(allFiles, sortedComponentConfigFiles...)
  	return bytes.Join(allFiles, []byte(kubeadmconstants.YAMLDocumentSeparator)), nil
  }
docs: // MarshalClusterConfigurationToBytes marshals the internal ClusterConfiguration object to bytes. It writes the embedded
  // ComponentConfiguration objects out as separate YAML documents