All Products
Search
Document Center

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

Last Updated:Nov 14, 2024

To help you better monitor the operational status of the system, Ray provides an intuitive web interface called the Dashboard. The Dashboard allows you to perform visual monitoring, troubleshooting, performance tuning, and manage application operations. In a Container Service for Kubernetes (ACK) cluster, a Ray cluster created through the managed Kuberay-Operator component automatically generates a ClusterIP Service for the Head pod. However, since the Ray Dashboard lacks built-in authentication and authorization mechanisms, we do not recommend that you change this Service type to LoadBalancer, which exposes the Service to the Internet. As a secure alternative, you can use the kubectl port-forward command to forward ports from your local host, enabling secure access to the Ray Dashboard.

Important

Kuberay-Operator provided by ACK clusters is in invitational preview. To use this component, submit a ticket and apply for it.

Prerequisites

A Ray cluster is created. For more information, see Efficient deployment and optimization of Ray in ACK Clusters.

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