def get_containers(client, pod, namespace):    
    """
    makes a request against the Kubernetes api and extracts the names of pod's containers

    :param client the Kubernetes api client
    :param str pod: the name of the pod
    :param str namespace: the namespace where to search for the pod
    
    :return: the list of all containers within the pod
    """

    pod = client.read_namespaced_pod(pod, namespace)
    
    containers = []
    
    if pod and pod.spec.containers:
        containers = [ c.name for c in pod.spec.containers] 
    if pod and pod.spec.init_containers:
        containers += [ c.name for c in pod.spec.init_containers]
        
    return containers