Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/cluster-readiness.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,10 +424,12 @@ Missing pieces are warnings, not errors — the command surfaces them so you can
`./bin/mcp-runtime cluster doctor` runs post-install diagnostics:

- Detects your distribution (k3s / kind / minikube / docker-desktop / generic).
- Checks the installed MCP Runtime namespaces, CRDs, operator, Traefik ingress, registry, Sentinel, and MCPServer reconciliation path.
- Checks the installed MCP Runtime namespaces, CRDs, operator, Traefik ingress, registry, Sentinel, and MCPServer reconciliation path, including readiness of the temporary smoke deployment.
- Prefers k3s' bundled Traefik in `kube-system/traefik` when the active cluster is k3s, then falls back to the repo-managed `traefik/traefik` install.
- Verifies registry reachability, registry image-pull smoke behavior, and common pod image-pull failures.
- Reports `http: server gave HTTP response to HTTPS client` when kubelet/containerd tried HTTPS against the HTTP dev registry, including the affected pod and image where possible.
- Prints the distribution-specific remediation checklist from this document.
- Streams the current check before running it, including helper pod probes and waits, so a slow run shows what it is doing.
- Prints the distribution-specific registry remediation hint only when registry or image-pull checks fail; Traefik and Sentinel failures use their own check-specific remedies.

Run `bootstrap` before `setup` on a fresh cluster. Run `cluster doctor` after
setup, or when debugging `ImagePullBackOff` on an installed MCP Runtime stack.
19 changes: 19 additions & 0 deletions docs/internals/go-package-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -1762,6 +1762,18 @@ type DoctorCheck struct {
}
DoctorCheck is a single preflight check result.

type DoctorCheckProgress func(DoctorCheckProgressEvent) func(DoctorCheck)
DoctorCheckProgress is called before each doctor check starts. It returns an
optional completion callback that receives the finished check result.

type DoctorCheckProgressEvent struct {
Name string
Detail string
Index int
Total int
}
DoctorCheckProgressEvent describes the check that is about to run.

type DoctorReport struct {
Distribution Distribution
Checks []DoctorCheck
Expand All @@ -1771,6 +1783,13 @@ type DoctorReport struct {
func RunDoctor(kubectl KubectlRunner) DoctorReport
RunDoctor executes cluster diagnostics and returns a report.

func RunDoctorAndPrint(kubectl KubectlRunner) DoctorReport
RunDoctorAndPrint streams doctor progress and results as checks execute.

func RunDoctorWithProgress(kubectl KubectlRunner, progress DoctorCheckProgress) DoctorReport
RunDoctorWithProgress executes cluster diagnostics and calls progress hooks
before and after each check. It is useful for UIs that need live feedback.

func (r DoctorReport) AllOK() bool
AllOK reports whether every check passed.

Expand Down
Loading
Loading