code: func (kl *Kubelet) PodResourcesAreReclaimed(pod *v1.Pod, status v1.PodStatus) bool {
  	if !notRunning(status.ContainerStatuses) {
  		// We shouldnt delete pods that still have running containers
  		klog.V(3).Infof("Pod %q is terminated, but some containers are still running", format.Pod(pod))
  		return false
  	}
  	// pod's containers should be deleted
  	runtimeStatus, err := kl.podCache.Get(pod.UID)
  	if err != nil {
  		klog.V(3).Infof("Pod %q is terminated, Error getting runtimeStatus from the podCache: %s", format.Pod(pod), err)
  		return false
  	}
  	if len(runtimeStatus.ContainerStatuses) > 0 {
  		var statusStr string
  		for _, status := range runtimeStatus.ContainerStatuses {
  			statusStr += fmt.Sprintf("%+v ", *status)
  		}
  		klog.V(3).Infof("Pod %q is terminated, but some containers have not been cleaned up: %s", format.Pod(pod), statusStr)
  		return false
  	}
  	if kl.podVolumesExist(pod.UID) && !kl.keepTerminatedPodVolumes {
  		// We shouldnt delete pods whose volumes have not been cleaned up if we are not keeping terminated pod volumes
  		klog.V(3).Infof("Pod %q is terminated, but some volumes have not been cleaned up", format.Pod(pod))
  		return false
  	}
  	if kl.kubeletConfiguration.CgroupsPerQOS {
  		pcm := kl.containerManager.NewPodContainerManager()
  		if pcm.Exists(pod) {
  			klog.V(3).Infof("Pod %q is terminated, but pod cgroup sandbox has not been cleaned up", format.Pod(pod))
  			return false
  		}
  	}
  	return true
  }
docs: // PodResourcesAreReclaimed returns true if all required node-level resources that a pod was consuming have
  // been reclaimed by the kubelet.  Reclaiming resources is a prerequisite to deleting a pod from the API server.