def _get_master_pod(release_name, pods):
    """Given a release name and a list of pods, returns the master pod of the release

    Args:
        release_name (str): Release name
        pods (:obj:`V1PodList`): List of pods

    Returns:
        (:obj:`Pod`, optional): The master pod
    """

    master_pod_name = "{}-mlbench-master-".format(release_name)
    for pod in pods.items:
        if master_pod_name in pod.metadata.name:
            return pod

    return None