def __get_pods_by_namespace(core_client, namespace):
    """
    Retrieves the pods for a given namespace
    :param core_client: the kubernetes API client
    :param namespace: the namespace of the pod to add into the return list
    :return: list of pod item objects
    """
    out_pods = list()
    pod_list = core_client.list_namespaced_pod(namespace=namespace)
    pod_items = pod_list.items

    for pod_item in pod_items:
        pod_meta = pod_item.metadata
        if pod_meta.namespace == namespace:
            out_pods.append(pod_item)

    return out_pods