# What'd be the best way to export ray cluster service to the internet?

**URL:** <https://discuss.ray.io/t/whatd-be-the-best-way-to-export-ray-cluster-service-to-the-internet/6881>\
**Category:** Ray Clusters\
**Created:** [July 19, 2022, 9:34pm UTC](https://discuss.ray.io/t/whatd-be-the-best-way-to-export-ray-cluster-service-to-the-internet/6881 "2022-07-19T21:34:32Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![jlouea](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/jlouea/32/2904_2.png) [@jlouea](https://discuss.ray.io/u/jlouea)\
**Post date:** [July 19, 2022, 9:34pm UTC](https://discuss.ray.io/t/whatd-be-the-best-way-to-export-ray-cluster-service-to-the-internet/6881/1 "2022-07-19T21:34:32Z")

</div>

**How severe does this issue affect your experience of using Ray?**

- Medium: It contributes to significant difficulty to complete my task, but I can work around it.

I am trying to launch a ray cluster on k8s and latest doc suggests helm. I managed to install a ray cluster using helm. However, I want to export the port of dashboard to the internet so that I don’t need to run port-forward every time. Then I modified the existing service configuration and then it worked. My first question is: what should I do if I want to add annotations to service dynamically to the helm chart so that I don’t have to add it after the cluster is created?

I also found 1.1.0 ([Deploying on Kubernetes — Ray v1.1.0](https://docs.ray.io/en/releases-1.1.0/cluster/kubernetes.html)) allowed deploying from a yaml file directly. Will it be encourage to use for the latest version as well without installing crd?

Thanks for your time.

---

<div class="post-metadata">

**Author:** ![ckw017](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/ckw017/32/1683_2.png) [@ckw017](https://discuss.ray.io/u/ckw017)\
**Post date:** [July 22, 2022, 6:12pm UTC](https://discuss.ray.io/t/whatd-be-the-best-way-to-export-ray-cluster-service-to-the-internet/6881/2 "2022-07-22T18:12:45Z")

</div>

cc @Dmitri for helm chart and CRD question

---

<div class="post-metadata">

**Author:** ![Dmitri](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/dmitri/32/657_2.png) [@Dmitri](https://discuss.ray.io/u/Dmitri)\
**Post date:** [July 22, 2022, 7:22pm UTC](https://discuss.ray.io/t/whatd-be-the-best-way-to-export-ray-cluster-service-to-the-internet/6881/3 "2022-07-22T19:22:13Z")

</div>

Hi there – for now, you will have to modify the service by hand.

Making network configuration simple is on our minds – this will be smoother in the future.

---

<div class="post-metadata">

**Author:** ![jlouea](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/jlouea/32/2904_2.png) [@jlouea](https://discuss.ray.io/u/jlouea)\
**Post date:** [August 10, 2022, 9:56pm UTC](https://discuss.ray.io/t/whatd-be-the-best-way-to-export-ray-cluster-service-to-the-internet/6881/4 "2022-08-10T21:56:42Z")

</div>

thanks. I manually created a service to export the dashboard to internet and now I can see the UI in a URL like [https://server.com/ray/dashboard](https://server.com/ray/dashboard), and I would like to do the same thing to the port 10001 so that I don’t need to run port-forward any time. And I tried ray.init(“ray://[https://server.com/ray/conn](https://server.com/ray/conn)”) but it failed to connect. Is there any way to work around it? thanks.

---

<div class="post-metadata">

**Author:** ![Dmitri](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/dmitri/32/657_2.png) [@Dmitri](https://discuss.ray.io/u/Dmitri)\
**Post date:** [August 10, 2022, 11:32pm UTC](https://discuss.ray.io/t/whatd-be-the-best-way-to-export-ray-cluster-service-to-the-internet/6881/5 "2022-08-10T23:32:35Z")

</div>

Could you share the connection error message?  
Perhaps it’s generic, but still might be useful to see.

---

<div class="post-metadata">

**Author:** ![jlouea](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/jlouea/32/2904_2.png) [@jlouea](https://discuss.ray.io/u/jlouea)\
**Post date:** [August 11, 2022, 12:05am UTC](https://discuss.ray.io/t/whatd-be-the-best-way-to-export-ray-cluster-service-to-the-internet/6881/6 "2022-08-11T00:05:15Z")

</div>

sure. I ran `ray.init("ray://https://server.com/ray/conn/")` and got `ConnectionError: ray client connection timeout`

```auto
/usr/local/lib/python3.7/site-packages/ray/util/client/worker.py in _connect_channel(self, reconnecting)
    262 "more information."
    263 )
--> 264 raise ConnectionError("ray client connection timeout")
    265 
    266 def _can_reconnect(self, e: grpc.RpcError) -> bool:

ConnectionError: ray client connection timeout

```

and `https://server.com/ray/dashboard/` works. I used the same approach to export the service.  
let me know if you need more info.

---

<div class="post-metadata">

**Author:** ![Dmitri](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/dmitri/32/657_2.png) [@Dmitri](https://discuss.ray.io/u/Dmitri)\
**Post date:** [August 11, 2022, 12:33am UTC](https://discuss.ray.io/t/whatd-be-the-best-way-to-export-ray-cluster-service-to-the-internet/6881/7 "2022-08-11T00:33:07Z")

</div>

Hmm…are you able to expose a generic simple gRPC service using an ingress?  
It is possible that the issue is somehow related to Ray client’s use of gRPC vs. the dashboard’s plain http.
