Skip to content

[Docs][KubeRay] Update token auth docs for Ray 2.61 - #67897

Draft
machichima wants to merge 1 commit into
ray-project:masterfrom
machichima:kuberay-token-auth-doc
Draft

machichima wants to merge 1 commit into
ray-project:masterfrom
machichima:kuberay-token-auth-doc

Conversation

@machichima

@machichima machichima commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Description

Ray 2.61 enables token authentication by default (#67523), and KubeRay PR (kuberay-project/kuberay#5496) sets RAY_AUTH_MODE=disabled by default. Update the KubeRay docs accordingly.

Changes:

  1. auth.md: mention KubeRay v1.8.0+ sets RAY_AUTH_MODE=disabled by default, and clients with auth disabled must set it too.
  2. auth-rbac.md: mention RAY_ENABLE_K8S_TOKEN_AUTH requires RAY_AUTH_MODE=token
  3. prometheus-grafana.md: mention PodMonitor needs an authorization block or RAY_AUTH_SKIP_METRICS=1 starting from Ray 2.61

Related issues

Related to #67057

Additional information

Wait until kuberay-project/kuberay#5496 is merged

@machichima machichima changed the title [Docs][KubeRay] Update token auth docs for Ray 2.61 default-on [Docs][KubeRay] Update token auth docs for Ray 2.61 Nov 6, 2026
* Automatically mount a projected service account token to the Ray containers, for intra-cluster Ray process authentication.

If you are using a KubeRay version older than v1.7.0, you can enable RBAC authentication by setting the `RAY_AUTH_MODE` and `RAY_ENABLE_K8S_TOKEN_AUTH` environment variables and manually mounting the projected service account token to the Ray containers. See the following example:
If you are using a KubeRay version older than v1.6.0, you can enable RBAC authentication by setting the `RAY_AUTH_MODE` and `RAY_ENABLE_K8S_TOKEN_AUTH` environment variables and manually mounting the projected service account token to the Ray containers. `RAY_ENABLE_K8S_TOKEN_AUTH` requires `RAY_AUTH_MODE=token`. Ray refuses to start if both `RAY_AUTH_MODE=disabled` and `RAY_ENABLE_K8S_TOKEN_AUTH` are set. See the following example:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be 1.6.0, we mention v1.6.0 on line 42

* Automatically set the `RAY_AUTH_TOKEN` and `RAY_AUTH_MODE` environment variables on all Ray containers.

If you are using a KubeRay version older than v1.7.0, you can enable token authentication by creating a Kubernetes Secret containing your token and configuring the `RAY_AUTH_MODE` and `RAY_AUTH_TOKEN` environment variables.
If you are using a KubeRay version older than v1.6.0, you can enable token authentication by creating a Kubernetes Secret containing your token and configuring the `RAY_AUTH_MODE` and `RAY_AUTH_TOKEN` environment variables.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be 1.6.0, we mentioned v1.6.0 on line 46

@machichima
machichima force-pushed the kuberay-token-auth-doc branch from 08382ec to 31bf804 Compare November 6, 2026 09:15
@github-actions

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.

You can always ask for help on our discussion forum or Ray's public slack channel.

If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@github-actions github-actions Bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Nov 20, 2026
rueian pushed a commit to kuberay-project/kuberay that referenced this pull request Nov 24, 2026
## Why are these changes needed?

Ray token auth is enabled by default in Ray 2.61
(ray-project/ray#67523). KubeRay assumed token
auth is disabled by default, so no `RAY_AUTH_MODE` is added when
`authOptions` is not set. Users get an auth error when they use Ray 2.61
with the current KubeRay version.


This PR makes the following changes:

1. Always set `RAY_AUTH_MODE` on every Ray container. Set to `token`
when `authOptions.mode` is `token`, otherwise `disabled`. A
user-provided `RAY_AUTH_MODE` is never overridden.
2. Add comments in `config/prometheus/podMonitor.yaml` on how to
configure Prometheus for a RayCluster with token auth enabled, since Ray
2.61 also requires the token on the metrics endpoints
(ray-project/ray#67119).


## Related issue number

Related to ray-project/ray#67057

## Labels

<!-- Please add the appropriate labels to this PR. -->

- [x] If this PR has user-facing changes that require documentation
updates at release time, I have added the `doc-updates-required` label.
    - doc PR: ray-project/ray#67897
- [ ] If this PR contains breaking changes, I have added the
`breaking-change` label.

## AI assistance

Yes, AI assisted coding and test, reviewed by me and all manual tests
run by me manually

## Checks

- [x] I've made sure the tests are passing.
- Testing Strategy
  - [x] Unit tests
  - [x] Manual tests
  - [ ] This PR is not tested :(

<!-- If you selected "Manual tests" above, please fill in the section
below. Otherwise you can remove it. -->

### Manual test instructions

Test results:
#5496 (comment)

Signed-off-by: machichima <[email protected]>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale The issue is stale. It will be closed within 7 days unless there are further conversation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant