0

I'm setting up Ray on a kubernetes cluster.

I have started some workers and a head inside some pods.

Is there a way I can list the workers attached to the head, without writing a cluster config file?

Duane
  • 4,572
  • 6
  • 32
  • 33
  • 1
    Are you using the template at https://ray.readthedocs.io/en/latest/deploy-on-kubernetes.html? If you ssh to one of the nodes that Ray is running on, you can use the experimental API `ray.global_state.client_table()` to list the nodes in the cluster. This requires you to first do `ray.init(redis_address=...)`. – Robert Nishihara Apr 13 '19 at 19:41

1 Answers1

0

open python interpreter

import ray
import pprint
ray.init(redis_address="<cluster head>:<port>")
gsct = ray.global_state.client_table()
pprint.pprint(gsct)
Duane
  • 4,572
  • 6
  • 32
  • 33