All Products
Search
Document Center

Container Service for Kubernetes:Access Ray Dashboard from the local network

Last Updated:Feb 29, 2024

Ray provides a web dashboard that allows you to monitor and debug the status of Ray applications. After you create a Ray cluster in a Container Service for Kubernetes (ACK) cluster, you can run the kubectl port-forward command to access Ray Dashboard from the local network.

Prerequisites

A Ray cluster is created based on ACK.

Procedure

Note

The display of metrics in Ray Dashboard is disabled by default.

  1. Run the following command to query the service information of the Ray cluster in the namespace:

    kubectl get svc -n ${RAY_CLUSTER_NS}

    Expected output:

    NAME                           TYPE        CLUSTER-IP        EXTERNAL-IP   PORT(S)                                         AGE
    myfirst-ray-cluster-head-svc   ClusterIP   192.XX.XX.188   <none>        10001/TCP,8265/TCP,8080/TCP,6379/TCP,8000/TCP   18m
  2. Run the following command to use port-forward to forward traffic from the local port 8265 to the port 8265 of the Ray cluster:

    kubectl port-forward svc/myfirst-ray-cluster-head-svc --address 0.0.0.0 8265:8265 -n ${RAY_CLUSTER_NS}

    The following log is printed:

    Forwarding from 0.0.0.0:8265 -> 8265
  3. Access the address http://127.0.0.1:8265/ in the local browser. image

What to do next