code: func SavePodToFile(pod *api.Pod, filePath string, perm os.FileMode) error {
  	if filePath == "" {
  		return fmt.Errorf("file path not specified")
  	}
  	data, err := latest.GroupOrDie(api.GroupName).Codec.Encode(pod)
  	if err != nil {
  		return fmt.Errorf("failed encoding pod: %v", err)
  	}
  	return ioutil.WriteFile(filePath, data, perm)
  }
docs: // SavePodToFile will encode and save a pod to a given path & permissions