code: func Write(config clientcmdapi.Config) ([]byte, error) {
  	json, err := clientcmdlatest.Codec.Encode(&config)
  	if err != nil {
  		return nil, err
  	}
  	content, err := yaml.JSONToYAML(json)
  	if err != nil {
  		return nil, err
  	}
  	return content, nil
  }
docs: // Write serializes the config to yaml.
  // Encapsulates serialization without assuming the destination is a file.