code: func (kl *Kubelet) cleanUpContainersInPod(podID types.UID, exitedContainerID string) {
  	if podStatus, err := kl.podCache.Get(podID); err == nil {
  		removeAll := false
  		if syncedPod, ok := kl.podManager.GetPodByUID(podID); ok {
  			// generate the api status using the cached runtime status to get up-to-date ContainerStatuses
  			apiPodStatus := kl.generateAPIPodStatus(syncedPod, podStatus)
  			// When an evicted or deleted pod has already synced, all containers can be removed.
  			removeAll = eviction.PodIsEvicted(syncedPod.Status) || (syncedPod.DeletionTimestamp != nil && notRunning(apiPodStatus.ContainerStatuses))
  		}
  		kl.containerDeletor.deleteContainersInPod(exitedContainerID, podStatus, removeAll)
  	}
  }
docs: // Delete the eligible dead container instances in a pod. Depending on the configuration, the latest dead containers may be kept around.