# Using Ray clusters as a k8s microservice without port forwarding

**URL:** <https://discuss.ray.io/t/using-ray-clusters-as-a-k8s-microservice-without-port-forwarding/9045>\
**Category:** Kubernetes\
**Created:** [January 20, 2023, 2:17am UTC](https://discuss.ray.io/t/using-ray-clusters-as-a-k8s-microservice-without-port-forwarding/9045 "2023-01-20T02:17:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![banjo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/banjo/32/3750_2.png) [@banjo](https://discuss.ray.io/u/banjo)\
**Post date:** [January 20, 2023, 2:17am UTC](https://discuss.ray.io/t/using-ray-clusters-as-a-k8s-microservice-without-port-forwarding/9045/1 "2023-01-20T02:17:45Z")

</div>

- High: It blocks me to complete my task.

Hello

We are building an ML platform and trying to use Ray Clusters to execute jobs from other microservices. As far as I can tell, the best way to use kuberay and the clusters as part of the microservice architecture is to submit jobs using a forwarded port, which doesn’t work with the overall k8s architecture, since the pods need to be scaleable and not dependent on specific forwarded ports. What is recommended here? We would love to use ray as our core backend for the ml jobs, but having this job intermediary requirement prevents this. I am relatively new to Ray so would definitely appreciate any advice here! Hopefully I am missing something with ray or k8s in general!

Thanks

---

<div class="post-metadata">

**Author:** ![banjo](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/banjo/32/3750_2.png) [@banjo](https://discuss.ray.io/u/banjo)\
**Post date:** [January 20, 2023, 2:45am UTC](https://discuss.ray.io/t/using-ray-clusters-as-a-k8s-microservice-without-port-forwarding/9045/2 "2023-01-20T02:45:48Z")

</div>

Following up –

This link may solve my problem, it seems like there is an automatic setup for k8s nodes to interact that works here.

[https://docs.ray.io/en/latest/cluster/kubernetes/user-guides/config.html#kuberay-networking](https://docs.ray.io/en/latest/cluster/kubernetes/user-guides/config.html#kuberay-networking)
