(kubeconfig, namespace, remote_port, resource, resource_name)
Use `kubectl` to forward a remote port locally.
Use `kubectl` to forward a remote port locally.
Use kubectl to forward a remote port locally .
def port_forward(kubeconfig, namespace, remote_port, resource, resource_name):
    """Use `kubectl` to forward a remote port locally."""
    set_up = PortForwardUp(kubeconfig, namespace, remote_port, resource, resource_name)
    key = _build_temp_key(namespace, resource_name, remote_port)
    tear_down = KillProcess(key, PID_FILE)

    with environment_run(up=set_up, down=tear_down) as result:
        yield result
def port_forward ( kubeconfig , namespace , remote_port , resource , resource_name ) : set_up = PortForwardUp ( kubeconfig , namespace , remote_port , resource , resource_name ) key = _build_temp_key ( namespace , resource_name , remote_port ) tear_down = KillProcess ( key , PID_FILE ) with environment_run ( up = set_up , down = tear_down ) as result : yield result