Skip to content

Docs migration from XPK to CTK(1/5) - #5177

Draft
KevinYenky wants to merge 8 commits into
AI-Hypercomputer:mainfrom
KevinYenky:docs/ctk-migration-core-guides-pt1
Draft

Docs migration from XPK to CTK(1/5)#5177
KevinYenky wants to merge 8 commits into
AI-Hypercomputer:mainfrom
KevinYenky:docs/ctk-migration-core-guides-pt1

Conversation

@KevinYenky

Copy link
Copy Markdown

Description

This PR is the first part of decomposing XPK to Cluster Toolkit Migration. It initiates the transition of our documentation from the deprecated XPK launcher to Cluster Toolkit (CTK).

Specifically, this PR updates the core getting started and post-training guides:

  • Replaces xpk workload create and xpk workload create-pathways commands with their gcluster job submit equivalents for SFT, LoRA, and Distillation workflows.
  • Updates environment variable setups (e.g., migrating from XPK_CLUSTER to GKE_CLUSTER).
  • Adds instructions for using CTK to monitor and clean up workloads (gcluster job list, gcluster job logs, etc.).

Why this is being made:
CTK is replacing XPK as the primary submission mechanism for Google Kubernetes Engine (GKE) workloads. Breaking down the massive PR #5175 into smaller, logical chunks (starting with these core guides) makes the migration significantly easier to review and test.

Tests

tested by scripts that run the gcluster command provided in the documents, results stored in gcs bucket.

Checklist

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents.

@google-cla

google-cla Bot commented Sep 9, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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

Copy link
Copy Markdown

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 updates the MaxText documentation to transition from XPK to Cluster Toolkit (gcluster) as the recommended workflow for deploying and running workloads on Google Kubernetes Engine (GKE). The feedback suggests using the more generic --location flag instead of --zone for GKE cluster credentials to support regional clusters, and removing explicit configuration file paths (e.g., src/maxtext/configs/base.yml) from training commands since MaxText automatically infers configurations and these paths will fail in PyPI-based installations.

Comment thread docs/run_maxtext/run_maxtext_via_cluster_toolkit.md
Comment thread docs/run_maxtext/run_maxtext_via_xpk.md Outdated
Comment thread docs/run_maxtext/run_maxtext_via_pathways.md Outdated
Comment thread docs/run_maxtext/run_maxtext_via_pathways.md Outdated
@KevinYenky KevinYenky mentioned this pull request Sep 10, 2026
4 tasks
Comment thread docs/run_maxtext/run_maxtext_via_xpk.md Outdated

## Cluster Toolkit replacement

For new deployments, configure GKE access and submit the equivalent standard

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Instead of putting the instructions here, can we just link to Cluster toolkit's instruction.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done replacing it with the link, thanks

@SurbhiJainUSC

Copy link
Copy Markdown
Collaborator

@KevinYenky - can you please sign the CLA to unblock the CI?

@@ -84,7 +84,7 @@ First, ensure your local `kubectl` is authenticated with your target GKE cluster

```bash
gcloud container clusters get-credentials <GKE_CLUSTER_NAME> \

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Modify this command so that the command is editable:

gcloud container clusters get-credentials <CLUSTER_NAME> \
  --location <ZONE> \
  --project <PROJECT_ID>

Reference: https://github.com/AI-Hypercomputer/maxtext/blob/main/docs/_static/js/editable_commands.js

@@ -53,19 +53,13 @@ export ZONE=<GCP location> # e.g., 'us-central1'
export GKE_CLUSTER=<cluster name>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Can you also make all these variables editable as mentioned in the above comment?

@xibinliu

Copy link
Copy Markdown
Collaborator

@KevinYenky - can you please sign the CLA to unblock the CI?

Added Kevin to the CLA group.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants