Skip to content

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_namename (with resource_type=workload); project_nameproject-name. Apply the same project-name on all follow-up rafay_get, rafay_list, and rafay_execute calls.

Workflow

  1. Confirm inputs — Resolve workload_name and project_name. If the workload name is unknown, use rafay_list with resource_type=workload (and project-name when needed).

  2. Fetch workload (control plane) — Call rafay_get with resource_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.

  3. Fetch cluster record — Once you have the cluster name from the workload response, call rafay_get with resource_type=cluster, that cluster name, and the same project-name. Compare cluster readiness/connectivity with the workload state.

  4. Data plane: kubectl — When pods, deployments, or events are relevant, call rafay_execute with resource_type=cluster, action=kubectl, the cluster name, project-name=project_name, and command. Include the kubectl prefix 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
    

  5. 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.