Skip to content

docs: document KubeRay autoscaler RBAC requirements - #65965

Closed
cananoo wants to merge 2 commits into
ray-project:masterfrom
cananoo:docs/autoscaler-rbac-guidance
Closed

cananoo wants to merge 2 commits into
ray-project:masterfrom
cananoo:docs/autoscaler-rbac-guidance

Conversation

@cananoo

@cananoo cananoo commented Sep 6, 2026

Copy link
Copy Markdown

Summary

Document the RBAC needed by KubeRay's in-tree autoscaler in Ray's Kubernetes autoscaling guide. This moves the guidance requested in kuberay-project/kuberay#5223 to the Ray documentation.

The section lists the ServiceAccount, Role, and RoleBinding permissions, explains why list/watch are required for controller-runtime informer-backed reads, and gives a namespaced kubectl auth can-i check.

Why this is not duplicate work

KubeRay maintainers requested that this documentation live in Ray's Kubernetes autoscaling guide rather than the KubeRay chart README. I checked open Ray pull requests and found no existing pull request covering autoscaler RBAC guidance.

Testing

AI assistance was used in preparing this patch. The submitting contributor reviewed every changed line and is responsible for the final content.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request adds a new section to the autoscaling documentation detailing the RBAC permissions required by the KubeRay operator when in-tree autoscaling is enabled. The review feedback suggests expanding the listed RBAC permissions to include 'update' and 'patch' for all three resource types to ensure full reconciliation, and correcting the Helm chart property name from 'rbacEnable' to 'rbac.enable'.

Comment on lines +406 to +408
| Core (`""`) | `serviceaccounts` | `create`, `delete`, `get`, `list`, `watch` |
| `rbac.authorization.k8s.io` | `roles` | `create`, `delete`, `get`, `list`, `update`, `watch` |
| `rbac.authorization.k8s.io` | `rolebindings` | `create`, `delete`, `get`, `list`, `watch` |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

To fully reconcile these resources (including updating them when configuration drifts or changes), the KubeRay operator typically requires update and patch permissions for all three resource types, not just roles. Without update and patch on serviceaccounts and rolebindings, the operator will fail to update them if they already exist but need modification.

Suggested change
| Core (`""`) | `serviceaccounts` | `create`, `delete`, `get`, `list`, `watch` |
| `rbac.authorization.k8s.io` | `roles` | `create`, `delete`, `get`, `list`, `update`, `watch` |
| `rbac.authorization.k8s.io` | `rolebindings` | `create`, `delete`, `get`, `list`, `watch` |
| Core ("") | serviceaccounts | create, delete, get, list, patch, update, watch |
| rbac.authorization.k8s.io | roles | create, delete, get, list, patch, update, watch |
| rbac.authorization.k8s.io | rolebindings | create, delete, get, list, patch, update, watch |

can remain blocked instead of returning the underlying authorization error.

For a restricted installation, grant equivalent namespaced permissions in each namespace
listed by KubeRay's `watchNamespace` setting. If `rbacEnable` is `false`, create the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

medium

In KubeRay Helm charts, the configuration property is typically structured as rbac.enable rather than rbacEnable. Updating this to rbac.enable matches the standard Helm value name.

Suggested change
listed by KubeRay's `watchNamespace` setting. If `rbacEnable` is `false`, create the
listed by KubeRay's watchNamespace setting. If rbac.enable is false, create the

@ray-gardener ray-gardener Bot added docs An issue or change related to documentation core Issues that should be addressed in Ray Core community-contribution Contributed by the community labels Sep 6, 2026
Apply review feedback by documenting patch/update verbs for all autoscaler RBAC resources and using the rbac.enable Helm value name.

Signed-off-by: Min Peng <[email protected]>
@cananoo

cananoo commented Sep 7, 2026

Copy link
Copy Markdown
Author

Applied the review feedback in c744157: the RBAC table now includes patch and update for ServiceAccounts, Roles, and RoleBindings, and the Helm value is documented as rbac.enable. The change is limited to the requested documentation corrections; the PR checks are rerunning. Thanks for the review.

@MortalHappiness

Copy link
Copy Markdown
Member

@win5923 please help review this PR related to kuberay doc changes. Thanks.


| API group | Resources | Verbs |
| --- | --- | --- |
| Core (`""`) | `serviceaccounts` | `create`, `delete`, `get`, `list`, `patch`, `update`, `watch` |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
| Core (`""`) | `serviceaccounts` | `create`, `delete`, `get`, `list`, `patch`, `update`, `watch` |
| Core (`""`) | `serviceaccounts` | `get`, `create`, `list`, `watch` |

| API group | Resources | Verbs |
| --- | --- | --- |
| Core (`""`) | `serviceaccounts` | `create`, `delete`, `get`, `list`, `patch`, `update`, `watch` |
| `rbac.authorization.k8s.io` | `roles` | `create`, `delete`, `get`, `list`, `patch`, `update`, `watch` |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
| `rbac.authorization.k8s.io` | `roles` | `create`, `delete`, `get`, `list`, `patch`, `update`, `watch` |
| `rbac.authorization.k8s.io` | `roles` | `get`, `create`, `list`, `watch` |

| --- | --- | --- |
| Core (`""`) | `serviceaccounts` | `create`, `delete`, `get`, `list`, `patch`, `update`, `watch` |
| `rbac.authorization.k8s.io` | `roles` | `create`, `delete`, `get`, `list`, `patch`, `update`, `watch` |
| `rbac.authorization.k8s.io` | `rolebindings` | `create`, `delete`, `get`, `list`, `patch`, `update`, `watch` |

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
| `rbac.authorization.k8s.io` | `rolebindings` | `create`, `delete`, `get`, `list`, `patch`, `update`, `watch` |
| `rbac.authorization.k8s.io` | `rolebindings` | `get`, `create`, `list`, `watch` |

Comment on lines +410 to +427
The `list` and `watch` permissions are required even though the reconciler addresses the
generated objects by name. The operator's controller-runtime client can use informers for
these reads; if an informer cannot list one of these resources, autoscaling reconciliation
can remain blocked instead of returning the underlying authorization error.

For a restricted installation, grant equivalent namespaced permissions in each namespace
listed by KubeRay's `watchNamespace` setting. If `rbac.enable` is `false`, create the
equivalent rules yourself before enabling in-tree autoscaling. You can inspect the operator's
effective permissions with:

```bash
OPERATOR_NAMESPACE=ray-system
OPERATOR_SERVICE_ACCOUNT=kuberay-operator
RAYCLUSTER_NAMESPACE=default

kubectl auth can-i --as=system:serviceaccount:${OPERATOR_NAMESPACE}:${OPERATOR_SERVICE_ACCOUNT} \
--list --namespace=${RAYCLUSTER_NAMESPACE}
```

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
The `list` and `watch` permissions are required even though the reconciler addresses the
generated objects by name. The operator's controller-runtime client can use informers for
these reads; if an informer cannot list one of these resources, autoscaling reconciliation
can remain blocked instead of returning the underlying authorization error.
For a restricted installation, grant equivalent namespaced permissions in each namespace
listed by KubeRay's `watchNamespace` setting. If `rbac.enable` is `false`, create the
equivalent rules yourself before enabling in-tree autoscaling. You can inspect the operator's
effective permissions with:
```bash
OPERATOR_NAMESPACE=ray-system
OPERATOR_SERVICE_ACCOUNT=kuberay-operator
RAYCLUSTER_NAMESPACE=default
kubectl auth can-i --as=system:serviceaccount:${OPERATOR_NAMESPACE}:${OPERATOR_SERVICE_ACCOUNT} \
--list --namespace=${RAYCLUSTER_NAMESPACE}
```

Remove these lines. We only need to document the RBAC permissions required for operator.

Comment on lines +396 to +399
When a `RayCluster` enables in-tree autoscaling (`spec.enableInTreeAutoscaling: true`),
KubeRay creates and reconciles a `ServiceAccount`, `Role`, and `RoleBinding` for the
autoscaler in the RayCluster namespace. The KubeRay operator's `ServiceAccount` must be
permitted to manage these resources.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
When a `RayCluster` enables in-tree autoscaling (`spec.enableInTreeAutoscaling: true`),
KubeRay creates and reconciles a `ServiceAccount`, `Role`, and `RoleBinding` for the
autoscaler in the RayCluster namespace. The KubeRay operator's `ServiceAccount` must be
permitted to manage these resources.
When a `RayCluster` sets `spec.enableInTreeAutoscaling: true`, the KubeRay Operator creates a `ServiceAccount`, `Role`, and `RoleBinding` in the RayCluster's namespace for the Ray Autoscaler.

Comment on lines +401 to +403
If you use custom RBAC or restrict the rules generated by the KubeRay installation, retain
the following namespaced permissions for the operator in every namespace it watches:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Suggested change
If you use custom RBAC or restrict the rules generated by the KubeRay installation, retain
the following namespaced permissions for the operator in every namespace it watches:
If you use custom RBAC rules or restrict the permissions granted by the KubeRay installation, ensure the operator retains the following permissions in each watched namespace:

@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 Sep 24, 2026
dstrodtman added a commit that referenced this pull request Oct 5, 2026
## Description

KubeRay is one of the most-visited areas of the Ray docs, but it sits
two levels down under Ray Clusters, and every KubeRay URL carries a
redundant `cluster/kubernetes/` prefix. This PR promotes KubeRay to a
top-level entry in the left sidebar and shortens its URLs by moving the
KubeRay docs from `doc/source/cluster/kubernetes/` to
`doc/source/kuberay/`. It replaces the top-nav tab approach from #65438.

All the Ray on Kubernetes docs move to `kuberay/`. KubeRay is the
officially supported way to run Ray on Kubernetes, and the docs already
removed the examples for deploying Ray manually (#53833). The few guides
that apply to Ray on Kubernetes more broadly still use KubeRay for their
examples, so they stay with the rest of the KubeRay docs. The old
`cluster/kubernetes/index` landing page becomes a short
`cluster/kubernetes.md` page under Ray Clusters. It points readers to
KubeRay, says that a manual deployment is possible but not officially
supported, and lists the KubeRay guides that can help with other Ray on
Kubernetes deployments. The KubeRay landing page now covers only
KubeRay.

Previews:

- [Ray on
Kubernetes](https://anyscale-ray--66674.com.readthedocs.build/en/66674/cluster/kubernetes.html)
-
[KubeRay](https://anyscale-ray--66674.com.readthedocs.build/en/66674/kuberay/index.html)

**Please review commit by commit.** Each commit is scoped so it can be
signed off on its own. The PR squash-merges as one change. Commits 3
through 5 came out of an earlier round of review, which kept
KubeRay-independent guides in a general `cluster/kubernetes/` section.
Commits 6 through 8 reverse that: they move those guides back under
KubeRay and turn the general section into a single page. If you're
reviewing for the first time, read commits 3 through 5 with the reversal
in mind. The final state is what commits 1, 2, and 6 through 8 describe.

## Related issues

Related to #65438, which this replaces.

## Additional information

### Commit 1: path change

What to sign off on: every file shows as a git rename, and the only
content deltas are path references that have to move with the files.

- Moves `cluster/kubernetes/` to `kuberay/`, which is 128 files, all
detected as renames. The tree moves as a unit, so the relative `images/`
and `configs/` paths inside it stay valid.
- Renames within the move, since every URL changes anyway:
- Hub pages move into their directories as `index.md`: `benchmarks`,
`examples`, `getting-started`, `references`, `troubleshooting`,
`user-guides`, and `k8s-ecosystem`.
  - `k8s-ecosystem/` becomes `ecosystem/`.
- Drops the redundant `kuberay-` filename prefix from 10 pages:
`getting-started/operator-installation`, and `user-guides/auth`,
`auth-rbac`, `dashboard`, `gcs-ft`, `gcs-persistent-ft`,
`gcs-rocksdb-ft`, `history-server`, `mtls`, `serve-high-throughput`.
- Path references updated with the move:
- Toctrees and `{doc}`/`:doc:`/relative Markdown links inside and
outside the tree (`ray-core/`, `serve/`, `ray-observability/`,
`ray-overview/`, `cluster/`).
  - `.github/CODEOWNERS`: same owners, new path.
  - `.vale.ini`: the path-scoped KubeRay style section.
- `conf.py`: adds `kuberay` to `all_toc_libs`. The directory scan only
picks up `ray-*` names, so without this entry `DOC_LIB=<lib>`
single-library builds would stop excluding KubeRay, and
`DOC_LIB=kuberay` wouldn't work. It previously rode along with
`cluster`.
- `/en/master/` links in the JAX trainer example `README.md` and
`.ipynb`.
- Path mentions in `ray-contribute/writing-style.md`,
`doc/.claude/skills/rst-to-myst/SKILL.md`, and the `_ext/llms_txt.py`
docstring example.
- Left alone on purpose:
- `(kuberay-*)=` and `(k8s-*)=` label definitions and every
label-targeted ref, since labels don't depend on filenames.
- Absolute `docs.ray.io/en/latest/...` and release-pinned links in prose
and in `python/ray/autoscaler/_private/kuberay/autoscaling_config.py`.
The redirects below cover them. Rewriting `/en/latest/` links before a
release ships the new paths would break them.

**Redirects** (`doc/redirects/current.yaml`):

- Specific `page` rules for the 7 hubs, the `k8s-ecosystem/*` prefix,
and the 10 prefix drops, placed before the directory wildcard
`/cluster/kubernetes/*` → `/kuberay/:splat`.
- The existing catch-all `/cluster/kubernetes/*` →
`/cluster/kubernetes/index.html` moves to `from: /kuberay/*` with its
`to:` unchanged, so older releases keep resolving.
- `rtd-redirects validate`: 0 errors, 0 warnings. Chain notes go from 58
to 78.
- `rtd-redirects simulate --prefix /cluster/kubernetes/` passes on
master, latest, `releases-2.58.0`, `releases-2.40.0`, and
`releases-2.20.0`: 0 regressions, 0 wrong landings, 0 new loops on every
version.

Final state, all eight commits, run with `--git-renames doc/source` and
each release's `objects.inv` as its page set:

  | Version | 0 hops | 1 hop | 2 hops | 3 hops |
  |---|---|---|---|---|
  | master (after) | 0 | 271 | 11 | 11 |
  | latest | 97 | 240 | 16 | 0 |
  | releases-2.58.0 | 96 | 240 | 17 | 0 |
  | releases-2.40.0 | 75 | 173 | 40 | 0 |
  | releases-2.20.0 | 66 | 173 | 49 | 0 |

Every page under `/cluster/kubernetes/` on master today reaches its new
path in one hop, including the storage and image pull latency guides and
the landing page itself, `/cluster/kubernetes/index.html`, which lands
on `/kuberay/index.html`. No master URL resolves without a redirect,
because nothing stays under `/cluster/kubernetes/`. The new
`cluster/kubernetes.html` page is a new URL.

The 3-hop entries on master are URLs that don't match any current page,
such as pages removed before this PR. They go from
`/cluster/kubernetes/<page>` to `/kuberay/<page>`, then through the
`/kuberay/*` catch-all to `/cluster/kubernetes/index.html`, then through
the wildcard to `/kuberay/index.html`. They land on the KubeRay landing
page, which is the page they reached before. The catch-all's `to:` stays
`/cluster/kubernetes/index.html` so older releases, which have no
`kuberay/` directory, keep resolving without a loop. The 2-hop entries
on older releases are KubeRay pages newer than that release, and they
land on the same index page as before. The remaining 2-hop entries are
pre-existing chains outside KubeRay, such as RLlib and Tune.

**llms.txt shards.** RtD page redirects fire on any 404 path, not only
`.html`. On today's master,
`/en/master/cluster/kubernetes/no-such-file.txt` already 301s through
the existing `/cluster/kubernetes/*` catch-all. The local build emits
`kuberay/llms-full.txt`, so `/cluster/kubernetes/llms-full.txt` reaches
it through the directory wildcard in one hop, with no extra rule.
`simulate` reports that URL as landing on the index instead, because its
page sources only list HTML pages. It reports the same URL as missing on
today's master, where it returns 200.

### Commit 2: navigation

What to sign off on: sidebar order only.

- Root toctree: adds `KubeRay <kuberay/index>` directly above Ray Core,
and moves `Ecosystem` from above Ray Core to directly below APIs.
- Removes `Deploying on Kubernetes` from the Ray Clusters toctree, so
KubeRay has one parent. Commit 4 restores the entry for the general
section.
- `navbar.yml` doesn't reference KubeRay pages, so it doesn't change.

### Commit 3: keep KubeRay-independent content in `cluster/kubernetes/`

Commit 7 reverses the page moves in this commit. The config file stays
where this commit puts it.

What to sign off on: these files don't depend on the KubeRay operator,
and they keep their master paths.

- Moves back to `cluster/kubernetes/`, as git renames:
  - `user-guides/storage.md`, with its two images.
  - `user-guides/reduce-image-pull-latency.md`.
- `configs/static-ray-cluster.tls.yaml`. It's a plain-Deployment Ray
cluster with no KubeRay, left over from the page #53833 removed, and its
only consumer is `ray-core/configure.md`. Keeping it in place means that
file's raw GitHub link doesn't change at all, so existing copies of the
link keep working.
- `.github/CODEOWNERS`: keeps the `/doc/source/cluster/kubernetes/`
entry alongside the new `/doc/source/kuberay/` one, with the same
owners.
- `.vale.ini`: registers the KubeRay style for both paths.
- The two pages need no redirects, because RtD page redirects only fire
on a 404.

### Commit 4: general Ray on Kubernetes section

Commit 7 replaces this section with a single page,
`cluster/kubernetes.md`.

What to sign off on: navigation only, plus a minimal index page.

- Adds `cluster/kubernetes/index.md` as the parent for the two general
guides. It links to KubeRay for deploying and managing Ray clusters with
the operator. It's intentionally short for now.
- Restores `Deploying on Kubernetes` in the Ray Clusters toctree, now
pointing at that page. KubeRay keeps a single parent, the root toctree.
- Moves the two guides from the KubeRay user-guides toctree to the new
index. The KubeRay user-guides list keeps both as cross-references.
- Updates the Ray on Kubernetes path mention in
`ray-contribute/writing-style.md`.

### Commit 5: landing pages

Commits 6 and 8 revise both pages again.

What to sign off on: prose on the two index pages.

- `kuberay/index.md`: retitles the page from "Ray on Kubernetes" to
"KubeRay" and rewrites the opening as an introduction to KubeRay,
without the "Overview" heading. The `kuberay-index` label moves to the
H1, so its existing refs keep resolving. The custom resource list adds
RayCronJob, so it names all four `ray.io/v1` kinds. The page links to
the general section.
- `cluster/kubernetes/index.md`: lists the operators that deploy and
manage Ray clusters on Kubernetes, which are KubeRay and the Anyscale
operator, with a link to the Anyscale on Kubernetes docs.

### Commit 6: center the KubeRay landing page on KubeRay

What to sign off on: prose on the two landing pages.

- `kuberay/index.md`: removes the Anyscale paragraph. Reframes the card
grid and the "Learn more" lead-in around KubeRay rather than Kubernetes
in general, and sentence-cases the card titles and buttons. Folds the
one-item "About KubeRay" list into prose.
- `cluster/kubernetes/index.md`: cuts the Anyscale operator entry to one
line that links to the Anyscale docs.

### Commit 7: move the general guides back under KubeRay

What to sign off on: path changes only, with no prose edits.

- Moves `storage.md`, its two images, and `reduce-image-pull-latency.md`
back to `kuberay/user-guides/` as git renames, and restores both guides
to the KubeRay user-guides toctree in their original positions.
- Renames `cluster/kubernetes/index.md` to `cluster/kubernetes.md`,
since it no longer has child pages. The Ray Clusters toctree points at
the new path.
- Leaves `cluster/kubernetes/configs/static-ray-cluster.tls.yaml` in
place, so the raw GitHub link in `ray-core/configure.md` doesn't change.
- `.github/CODEOWNERS`: adds `/doc/source/cluster/kubernetes.md` and
keeps the `/doc/source/cluster/kubernetes/` entry for the config file.
`.vale.ini` and `ray-contribute/writing-style.md` point at the new page
path.
- Needs no new redirects. The old master URLs of the two guides reach
their new paths in one hop through the existing `/cluster/kubernetes/*`
wildcard.

### Commit 8: rewrite the Ray on Kubernetes page

What to sign off on: prose on `cluster/kubernetes.md`.

- States that KubeRay is the officially supported way to run Ray on
Kubernetes, and that a manual deployment without an operator is possible
but not officially supported.
- Keeps a one-line pointer to the Anyscale docs for the Anyscale
operator.
- Adds a "KubeRay guides that apply more broadly" section, which links
to the storage and dependencies, image pull latency, managed Kubernetes
cluster setup, and scheduling guides. Their examples use KubeRay, and
the section says so.

### Out of scope

- Expanding `cluster/kubernetes.md` beyond its pointer to KubeRay and
the guide list.
- Reworking the Ray Clusters landing page prose and cards that still
describe Kubernetes as one of two deployment paths.
- `user-guides/k8s-*` slugs (`k8s-autoscaler`, `k8s-cluster-setup`,
`k8s-events`), `persist-kuberay-*-logs`, and
`troubleshooting/troubleshooting.md`. Reviewers: if you'd like any of
these renamed, say so, and it can go in a follow-up so this PR stays a
pure move.

### Verification

- `make -C doc rtd-build` (RtD-faithful, `-W --keep-going`) builds clean
for commits 1 and 2, and for the state after commit 5: `build
succeeded.`, exit 0. The RtD preview build is the check for commits 6
through 8.
- `rtd-redirects validate`: 0 errors, 0 warnings on the final state.
`rtd-redirects simulate` reports 0 regressions, 0 wrong landings, and 0
new loops on every version in the table above.
- Rebased onto master. The only conflict was
`ray-observability/ray-distributed-debugger`, which master converted
from RST to MyST. Commit 1 applies its two quickstart link updates to
the new `.md` file.
- Commit 1 shows all 128 targets as renames in `git show --stat
--find-renames`.

### Coordination

Open PRs touching this directory will need a rebase onto the new paths
after this merges: #65848, #65709, #65965, #66089, #65840. I'll handle
those rebases. Git rename detection should carry most of them over
cleanly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
## Description

KubeRay is one of the most-visited areas of the Ray docs, but it sits
two levels down under Ray Clusters, and every KubeRay URL carries a
redundant `cluster/kubernetes/` prefix. This PR promotes KubeRay to a
top-level entry in the left sidebar and shortens its URLs by moving the
KubeRay docs from `doc/source/cluster/kubernetes/` to
`doc/source/kuberay/`. It replaces the top-nav tab approach from ray-project#65438.

All the Ray on Kubernetes docs move to `kuberay/`. KubeRay is the
officially supported way to run Ray on Kubernetes, and the docs already
removed the examples for deploying Ray manually (ray-project#53833). The few guides
that apply to Ray on Kubernetes more broadly still use KubeRay for their
examples, so they stay with the rest of the KubeRay docs. The old
`cluster/kubernetes/index` landing page becomes a short
`cluster/kubernetes.md` page under Ray Clusters. It points readers to
KubeRay, says that a manual deployment is possible but not officially
supported, and lists the KubeRay guides that can help with other Ray on
Kubernetes deployments. The KubeRay landing page now covers only
KubeRay.

Previews:

- [Ray on
Kubernetes](https://anyscale-ray--66674.com.readthedocs.build/en/66674/cluster/kubernetes.html)
-
[KubeRay](https://anyscale-ray--66674.com.readthedocs.build/en/66674/kuberay/index.html)

**Please review commit by commit.** Each commit is scoped so it can be
signed off on its own. The PR squash-merges as one change. Commits 3
through 5 came out of an earlier round of review, which kept
KubeRay-independent guides in a general `cluster/kubernetes/` section.
Commits 6 through 8 reverse that: they move those guides back under
KubeRay and turn the general section into a single page. If you're
reviewing for the first time, read commits 3 through 5 with the reversal
in mind. The final state is what commits 1, 2, and 6 through 8 describe.

## Related issues

Related to ray-project#65438, which this replaces.

## Additional information

### Commit 1: path change

What to sign off on: every file shows as a git rename, and the only
content deltas are path references that have to move with the files.

- Moves `cluster/kubernetes/` to `kuberay/`, which is 128 files, all
detected as renames. The tree moves as a unit, so the relative `images/`
and `configs/` paths inside it stay valid.
- Renames within the move, since every URL changes anyway:
- Hub pages move into their directories as `index.md`: `benchmarks`,
`examples`, `getting-started`, `references`, `troubleshooting`,
`user-guides`, and `k8s-ecosystem`.
  - `k8s-ecosystem/` becomes `ecosystem/`.
- Drops the redundant `kuberay-` filename prefix from 10 pages:
`getting-started/operator-installation`, and `user-guides/auth`,
`auth-rbac`, `dashboard`, `gcs-ft`, `gcs-persistent-ft`,
`gcs-rocksdb-ft`, `history-server`, `mtls`, `serve-high-throughput`.
- Path references updated with the move:
- Toctrees and `{doc}`/`:doc:`/relative Markdown links inside and
outside the tree (`ray-core/`, `serve/`, `ray-observability/`,
`ray-overview/`, `cluster/`).
  - `.github/CODEOWNERS`: same owners, new path.
  - `.vale.ini`: the path-scoped KubeRay style section.
- `conf.py`: adds `kuberay` to `all_toc_libs`. The directory scan only
picks up `ray-*` names, so without this entry `DOC_LIB=<lib>`
single-library builds would stop excluding KubeRay, and
`DOC_LIB=kuberay` wouldn't work. It previously rode along with
`cluster`.
- `/en/master/` links in the JAX trainer example `README.md` and
`.ipynb`.
- Path mentions in `ray-contribute/writing-style.md`,
`doc/.claude/skills/rst-to-myst/SKILL.md`, and the `_ext/llms_txt.py`
docstring example.
- Left alone on purpose:
- `(kuberay-*)=` and `(k8s-*)=` label definitions and every
label-targeted ref, since labels don't depend on filenames.
- Absolute `docs.ray.io/en/latest/...` and release-pinned links in prose
and in `python/ray/autoscaler/_private/kuberay/autoscaling_config.py`.
The redirects below cover them. Rewriting `/en/latest/` links before a
release ships the new paths would break them.

**Redirects** (`doc/redirects/current.yaml`):

- Specific `page` rules for the 7 hubs, the `k8s-ecosystem/*` prefix,
and the 10 prefix drops, placed before the directory wildcard
`/cluster/kubernetes/*` → `/kuberay/:splat`.
- The existing catch-all `/cluster/kubernetes/*` →
`/cluster/kubernetes/index.html` moves to `from: /kuberay/*` with its
`to:` unchanged, so older releases keep resolving.
- `rtd-redirects validate`: 0 errors, 0 warnings. Chain notes go from 58
to 78.
- `rtd-redirects simulate --prefix /cluster/kubernetes/` passes on
master, latest, `releases-2.58.0`, `releases-2.40.0`, and
`releases-2.20.0`: 0 regressions, 0 wrong landings, 0 new loops on every
version.

Final state, all eight commits, run with `--git-renames doc/source` and
each release's `objects.inv` as its page set:

  | Version | 0 hops | 1 hop | 2 hops | 3 hops |
  |---|---|---|---|---|
  | master (after) | 0 | 271 | 11 | 11 |
  | latest | 97 | 240 | 16 | 0 |
  | releases-2.58.0 | 96 | 240 | 17 | 0 |
  | releases-2.40.0 | 75 | 173 | 40 | 0 |
  | releases-2.20.0 | 66 | 173 | 49 | 0 |

Every page under `/cluster/kubernetes/` on master today reaches its new
path in one hop, including the storage and image pull latency guides and
the landing page itself, `/cluster/kubernetes/index.html`, which lands
on `/kuberay/index.html`. No master URL resolves without a redirect,
because nothing stays under `/cluster/kubernetes/`. The new
`cluster/kubernetes.html` page is a new URL.

The 3-hop entries on master are URLs that don't match any current page,
such as pages removed before this PR. They go from
`/cluster/kubernetes/<page>` to `/kuberay/<page>`, then through the
`/kuberay/*` catch-all to `/cluster/kubernetes/index.html`, then through
the wildcard to `/kuberay/index.html`. They land on the KubeRay landing
page, which is the page they reached before. The catch-all's `to:` stays
`/cluster/kubernetes/index.html` so older releases, which have no
`kuberay/` directory, keep resolving without a loop. The 2-hop entries
on older releases are KubeRay pages newer than that release, and they
land on the same index page as before. The remaining 2-hop entries are
pre-existing chains outside KubeRay, such as RLlib and Tune.

**llms.txt shards.** RtD page redirects fire on any 404 path, not only
`.html`. On today's master,
`/en/master/cluster/kubernetes/no-such-file.txt` already 301s through
the existing `/cluster/kubernetes/*` catch-all. The local build emits
`kuberay/llms-full.txt`, so `/cluster/kubernetes/llms-full.txt` reaches
it through the directory wildcard in one hop, with no extra rule.
`simulate` reports that URL as landing on the index instead, because its
page sources only list HTML pages. It reports the same URL as missing on
today's master, where it returns 200.

### Commit 2: navigation

What to sign off on: sidebar order only.

- Root toctree: adds `KubeRay <kuberay/index>` directly above Ray Core,
and moves `Ecosystem` from above Ray Core to directly below APIs.
- Removes `Deploying on Kubernetes` from the Ray Clusters toctree, so
KubeRay has one parent. Commit 4 restores the entry for the general
section.
- `navbar.yml` doesn't reference KubeRay pages, so it doesn't change.

### Commit 3: keep KubeRay-independent content in `cluster/kubernetes/`

Commit 7 reverses the page moves in this commit. The config file stays
where this commit puts it.

What to sign off on: these files don't depend on the KubeRay operator,
and they keep their master paths.

- Moves back to `cluster/kubernetes/`, as git renames:
  - `user-guides/storage.md`, with its two images.
  - `user-guides/reduce-image-pull-latency.md`.
- `configs/static-ray-cluster.tls.yaml`. It's a plain-Deployment Ray
cluster with no KubeRay, left over from the page ray-project#53833 removed, and its
only consumer is `ray-core/configure.md`. Keeping it in place means that
file's raw GitHub link doesn't change at all, so existing copies of the
link keep working.
- `.github/CODEOWNERS`: keeps the `/doc/source/cluster/kubernetes/`
entry alongside the new `/doc/source/kuberay/` one, with the same
owners.
- `.vale.ini`: registers the KubeRay style for both paths.
- The two pages need no redirects, because RtD page redirects only fire
on a 404.

### Commit 4: general Ray on Kubernetes section

Commit 7 replaces this section with a single page,
`cluster/kubernetes.md`.

What to sign off on: navigation only, plus a minimal index page.

- Adds `cluster/kubernetes/index.md` as the parent for the two general
guides. It links to KubeRay for deploying and managing Ray clusters with
the operator. It's intentionally short for now.
- Restores `Deploying on Kubernetes` in the Ray Clusters toctree, now
pointing at that page. KubeRay keeps a single parent, the root toctree.
- Moves the two guides from the KubeRay user-guides toctree to the new
index. The KubeRay user-guides list keeps both as cross-references.
- Updates the Ray on Kubernetes path mention in
`ray-contribute/writing-style.md`.

### Commit 5: landing pages

Commits 6 and 8 revise both pages again.

What to sign off on: prose on the two index pages.

- `kuberay/index.md`: retitles the page from "Ray on Kubernetes" to
"KubeRay" and rewrites the opening as an introduction to KubeRay,
without the "Overview" heading. The `kuberay-index` label moves to the
H1, so its existing refs keep resolving. The custom resource list adds
RayCronJob, so it names all four `ray.io/v1` kinds. The page links to
the general section.
- `cluster/kubernetes/index.md`: lists the operators that deploy and
manage Ray clusters on Kubernetes, which are KubeRay and the Anyscale
operator, with a link to the Anyscale on Kubernetes docs.

### Commit 6: center the KubeRay landing page on KubeRay

What to sign off on: prose on the two landing pages.

- `kuberay/index.md`: removes the Anyscale paragraph. Reframes the card
grid and the "Learn more" lead-in around KubeRay rather than Kubernetes
in general, and sentence-cases the card titles and buttons. Folds the
one-item "About KubeRay" list into prose.
- `cluster/kubernetes/index.md`: cuts the Anyscale operator entry to one
line that links to the Anyscale docs.

### Commit 7: move the general guides back under KubeRay

What to sign off on: path changes only, with no prose edits.

- Moves `storage.md`, its two images, and `reduce-image-pull-latency.md`
back to `kuberay/user-guides/` as git renames, and restores both guides
to the KubeRay user-guides toctree in their original positions.
- Renames `cluster/kubernetes/index.md` to `cluster/kubernetes.md`,
since it no longer has child pages. The Ray Clusters toctree points at
the new path.
- Leaves `cluster/kubernetes/configs/static-ray-cluster.tls.yaml` in
place, so the raw GitHub link in `ray-core/configure.md` doesn't change.
- `.github/CODEOWNERS`: adds `/doc/source/cluster/kubernetes.md` and
keeps the `/doc/source/cluster/kubernetes/` entry for the config file.
`.vale.ini` and `ray-contribute/writing-style.md` point at the new page
path.
- Needs no new redirects. The old master URLs of the two guides reach
their new paths in one hop through the existing `/cluster/kubernetes/*`
wildcard.

### Commit 8: rewrite the Ray on Kubernetes page

What to sign off on: prose on `cluster/kubernetes.md`.

- States that KubeRay is the officially supported way to run Ray on
Kubernetes, and that a manual deployment without an operator is possible
but not officially supported.
- Keeps a one-line pointer to the Anyscale docs for the Anyscale
operator.
- Adds a "KubeRay guides that apply more broadly" section, which links
to the storage and dependencies, image pull latency, managed Kubernetes
cluster setup, and scheduling guides. Their examples use KubeRay, and
the section says so.

### Out of scope

- Expanding `cluster/kubernetes.md` beyond its pointer to KubeRay and
the guide list.
- Reworking the Ray Clusters landing page prose and cards that still
describe Kubernetes as one of two deployment paths.
- `user-guides/k8s-*` slugs (`k8s-autoscaler`, `k8s-cluster-setup`,
`k8s-events`), `persist-kuberay-*-logs`, and
`troubleshooting/troubleshooting.md`. Reviewers: if you'd like any of
these renamed, say so, and it can go in a follow-up so this PR stays a
pure move.

### Verification

- `make -C doc rtd-build` (RtD-faithful, `-W --keep-going`) builds clean
for commits 1 and 2, and for the state after commit 5: `build
succeeded.`, exit 0. The RtD preview build is the check for commits 6
through 8.
- `rtd-redirects validate`: 0 errors, 0 warnings on the final state.
`rtd-redirects simulate` reports 0 regressions, 0 wrong landings, and 0
new loops on every version in the table above.
- Rebased onto master. The only conflict was
`ray-observability/ray-distributed-debugger`, which master converted
from RST to MyST. Commit 1 applies its two quickstart link updates to
the new `.md` file.
- Commit 1 shows all 128 targets as renames in `git show --stat
--find-renames`.

### Coordination

Open PRs touching this directory will need a rebase onto the new paths
after this merges: ray-project#65848, ray-project#65709, ray-project#65965, ray-project#66089, ray-project#65840. I'll handle
those rebases. Git rename detection should carry most of them over
cleanly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

This pull request has been automatically closed because there has been no more activity in the 14 days
since being marked stale.

Please feel free to reopen or open a new pull request if you'd still like this to be addressed.

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

Thanks again for your contribution!

@github-actions github-actions Bot closed this Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community-contribution Contributed by the community core Issues that should be addressed in Ray Core docs An issue or change related to documentation 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.

3 participants