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
Procedure
The display of metrics in Ray Dashboard is disabled by default.
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
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
Access the address http://127.0.0.1:8265/ in the local browser.
What to do next
For more information about how to submit a job to run distributed tasks in a Ray cluster, see Submit a Ray job.
For information about how to use the Ray autoscaler to automatically scale Elastic Compute Service (ECS) nodes or virtual Elastic Container Instance nodes, see Elastic scaling based on the Ray autoscaler and ACK autoscaler and Elastic scaling of Elastic Container Instance nodes based on the Ray autoscaler.