code: func (kl *Kubelet) convertStatusToAPIStatus(pod *v1.Pod, podStatus *kubecontainer.PodStatus) *v1.PodStatus {
  	var apiPodStatus v1.PodStatus
  	apiPodStatus.PodIP = podStatus.IP
  	// set status for Pods created on versions of kube older than 1.6
  	apiPodStatus.QOSClass = v1qos.GetPodQOS(pod)
  
  	oldPodStatus, found := kl.statusManager.GetPodStatus(pod.UID)
  	if !found {
  		oldPodStatus = pod.Status
  	}
  
  	apiPodStatus.ContainerStatuses = kl.convertToAPIContainerStatuses(
  		pod, podStatus,
  		oldPodStatus.ContainerStatuses,
  		pod.Spec.Containers,
  		len(pod.Spec.InitContainers) > 0,
  		false,
  	)
  	apiPodStatus.InitContainerStatuses = kl.convertToAPIContainerStatuses(
  		pod, podStatus,
  		oldPodStatus.InitContainerStatuses,
  		pod.Spec.InitContainers,
  		len(pod.Spec.InitContainers) > 0,
  		true,
  	)
  
  	// Preserves conditions not controlled by kubelet
  	for _, c := range pod.Status.Conditions {
  		if !kubetypes.PodConditionByKubelet(c.Type) {
  			apiPodStatus.Conditions = append(apiPodStatus.Conditions, c)
  		}
  	}
  	return &apiPodStatus
  }
docs: // convertStatusToAPIStatus creates an api PodStatus for the given pod from
  // the given internal pod status.  It is purely transformative and does not
  // alter the kubelet state at all.