Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Automatically get Ray head node IP address

I deployed a Ray cluster on an AKS cluster.
To run my applications leveraging the Ray cluster, currently I’m deploying each of my applications as a classic k8s Deployment object and connecting to the Ray cluster using

ray.init(address="<head-node-ip:10001")

The problem is that I’m manually inserting the head node IP by looking at the head node ip through kubectl describe pod head-node-pod. Is there a way to get it automatically ?

Thanks in advance.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

I think you should be leveraging on Kubernetes services and use the DNS instead of IP.

so in your case, the DNS would be head-node-svc.your-namespace.svc.cluster.local where head-node-svc is your new service associated with head node pod, your-namespace is your namespace where the pods and services are created, svc stays there as it is and cluster.local is your cluster domain.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading