Diagnose Rafay workload publish¶
Arguments provided: $ARGUMENTS
Inputs¶
| Key | Required | Description |
|---|---|---|
workload_name |
Yes | Rafay workload resource name. |
project_name |
When not the MCP default | Omit only if RAFAY_PROJECT already matches the workload's project. |
If either required value is missing, stop and ask the user to supply:
workload_name: <workload>
project_name: <project>
MCP mapping: workload_name → name (with resource_type=workload); project_name → project-name. Apply the same project-name on all follow-up rafay_get, rafay_list, and rafay_execute calls.
Workflow¶
-
Confirm inputs — Resolve
workload_nameandproject_name. If the workload name is unknown, userafay_listwithresource_type=workload(andproject-namewhen needed). -
Fetch workload (control plane) — Call
rafay_getwithresource_type=workload,name=workload_name,project-name=project_name. Parse status, conditions, publish/sync fields, errors, and last transition times. Infer target cluster(s) from the response—do not assume the user knows the cluster name. -
Fetch cluster record — Once you have the cluster name from the workload response, call
rafay_getwithresource_type=cluster, that clustername, and the sameproject-name. Compare cluster readiness/connectivity with the workload state. -
Data plane: kubectl — When pods, deployments, or events are relevant, call
rafay_executewithresource_type=cluster,action=kubectl, the clustername,project-name=project_name, andcommand. Include thekubectlprefix unless the server schema says otherwise. Start narrow and expand only if inconclusive:kubectl get pods -n <namespace> -o wide kubectl describe deployment <name> -n <namespace> kubectl get events -n <namespace> --sort-by=.lastTimestamp -
Synthesize — Explain what the Rafay API says about publish/sync, whether the cluster record aligns, and what kubectl shows. Call out mismatches (e.g. API says published but pods failing) and the next concrete check or fix.
Escalation¶
On auth errors, missing resources, or empty lists, state it explicitly and ask the user to re-send the structured block with correct values, or verify MCP credentials and RAFAY_PROJECT.