For the K8s ray cluster with ray opeartor setup. Why is ray.init(address='headIP:port') not allowed at the kuberenets job pod?

For the K8s ray cluster with ray opeartor setup. Why does ray.init(address=‘headIP:port’) is not allowed at the kuberenets job pod?

ray.client(address=‘headIP:port’).connect() works fine.
ray.util.connect(address=‘headIP:port’) works fine.

why not ray.init(address=‘headIP:port’) ?

screenshot will give more details:

It’s the nature of the API – ray.init starts Ray on a node of the cluster, ray.client().connect and ray.util.connect instantiates a client connection that allows communication with a server on the Ray head node.

In the near future, we’re planning to have ray.init instantiate a client connection if run remotely. (Then you’d get the expected behavior!) The Ray Client is relatively young, but we’re quickly transitioning it to become the standard mode of operation.