# Environment variables for running Ray on top of k8s

**URL:** <https://discuss.ray.io/t/environment-variables-for-running-ray-on-top-of-k8s/981>\
**Category:** Uncategorized\
**Created:** [February 23, 2021, 12:47am UTC](https://discuss.ray.io/t/environment-variables-for-running-ray-on-top-of-k8s/981 "2021-02-23T00:47:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mbehrendt](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/mbehrendt/32/516_2.png) [@mbehrendt](https://discuss.ray.io/u/mbehrendt)\
**Post date:** [February 23, 2021, 12:47am UTC](https://discuss.ray.io/t/environment-variables-for-running-ray-on-top-of-k8s/981/1 "2021-02-23T00:47:52Z")

</div>

I’m trying to pass in parameters to a custom container image I’d like to run Ray head and worker nodes. Where can I find information about how to define them in the cluster yaml? I’d assume allowing to use environment variables are a common mechanism for addressing this question, but obviously open to any alternative solution.

---

<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:** [February 23, 2021, 3:51am UTC](https://discuss.ray.io/t/environment-variables-for-running-ray-on-top-of-k8s/981/2 "2021-02-23T03:51:16Z")

</div>

One option is to use the pod configs in the cluster yaml

> **[Define Environment Variables for a Container](https://kubernetes.io/docs/tasks/inject-data-application/define-environment-variable-container/)**
>
> This page shows how to define environment variables for a container in a Kubernetes Pod.
> Before you begin You need to have a Kubernetes cluster, and the kubectl command-line tool must be configured to communicate with your cluster. If you do not...
