Skip to content

kuke health

kuke health [--since <duration|RFC3339|last-report>] [-o text|json|yaml] [--exit-code]
kuke health reports [-o text|json|yaml]
kuke health report <name|latest> [-o markdown|json|yaml]
kuke health report submit -f <file> [--file-issues <owner>/<repo>]
kuke health issue [--comment] -f <file>

kuke health shows kukeond's health digest: host and state checks, the error-level entries of kukeond's own log, and the cells in a failed state. The subcommands read and write health reports — kind: HealthReport documents, the triaged result of a majordomo health sweep.

The digest is computed inside kukeond, by plain code with no model involved. kuke only asks for it over the daemon socket, so the answer describes the host whether you run kuke health on the host or in a cell that mounts the kukeond socket.

Flags

Flag Default Description
--since 1h Start of the log window: a duration (90m), an RFC3339 time, or last-report.
-o text Output format: text, json or yaml.
--exit-code false Exit 2 when the digest has findings. Without it, a digest with findings exits 0.

Plus all global flags. kuke health always talks to kukeond; it has no --no-daemon mode.

--since last-report starts the window at the end (until) of the newest stored report, so consecutive sweeps neither overlap nor leave a gap. With no report stored it falls back to one hour.

Exit codes

Code Meaning
0 The digest is clean, or --exit-code was not given.
2 --exit-code was given and the digest has findings. Nothing is printed to stderr.
1 The command failed: kukeond unreachable, an invalid flag, a rejected report.

What the digest contains

Checks. The host and state set that kuke status reports, evaluated in kukeond instead of in the client:

Check Fails or warns when
host/containerd kukeond cannot reach the containerd socket (fail).
host/cgroup-v2 cgroup-v2 is not mounted (fail) or advertises no controllers (warn).
host/cni-plugins bridge or loopback is missing where kukeond executes CNI plugins (fail).
state/run-dir The kukeond socket directory holds entries kukeon does not own (warn).
state/containerd-ns A kukeon containerd namespace is claimed by no realm (warn).

host/cni-plugins differs from the kuke status row on purpose. kuke status looks at the host's /opt/cni/bin, which kukeon does not use; the digest looks at the plugins bundled in kukeond's image, which is where cell networking runs them. A missing plugin there is a failure.

Log errors. Error-level entries of kukeond's log inside the window, grouped by signature. The signature is the entry's message and error text with timestamps, identifiers and numbers masked, so start cell failed: task 4f1b2b0b822c: exit status 1 and the same failure for another task are one group. Each group has a count, first and last seen time, and its newest entry as a sample. When kukeond has no log file (it runs outside its cell), the digest says so in logNote and the other sections still apply.

Cells. Every cell currently in Failed or Error, whatever the window, with its full scope and the time it entered the state. Failed is kukeon's own bring-up failure and is tagged kukeon; Error is a workload that exited non-zero and is tagged workload. kukeon records no state transition time, so the time is the newest container finish time for an Error cell and the cell's last status write otherwise.

A digest is clean when every check is ok, no log group fell in the window and no cell is listed.

Digest schema

-o json and -o yaml print this shape. Like every kukeon document, the digest opens with apiVersion: v1beta1 and its kind, HealthDigest. New fields may be added without a version change. A digest is computed by kukeond on request and never stored: kuke apply rejects a HealthDigest document as an unknown kind.

{
  "apiVersion": "v1beta1",
  "kind": "HealthDigest",
  "since": "2026-11-17T09:00:00Z",
  "until": "2026-11-17T10:00:00Z",
  "clean": false,
  "checks": [
    {
      "section": "host",
      "name": "cni-plugins",
      "status": "fail",
      "detail": "/opt/cni/bin (missing: bridge)",
      "remediation": "redeploy kukeond from an image that bundles the CNI plugins: `kuke init --kukeond-image <image>`"
    }
  ],
  "logErrors": [
    {
      "signature": "start cell failed: task <id>: exit status <n>",
      "count": 3,
      "firstSeen": "2026-11-17T09:12:04Z",
      "lastSeen": "2026-11-17T09:48:51Z",
      "sample": "time=2026-11-17T09:48:51.120Z level=ERROR msg=\"start cell failed\" error=\"task 4f1b2b0b822c: exit status 1\""
    }
  ],
  "logSource": "/opt/kukeon/data/kuke-system/kukeon/kukeon/kukeond/kukeond/container.log",
  "cells": [
    {
      "realm": "default",
      "space": "default",
      "stack": "default",
      "name": "api",
      "state": "Failed",
      "classification": "kukeon",
      "since": "2026-11-17T09:48:51Z",
      "reason": "CreateFailed",
      "message": "cni attach failed"
    }
  ]
}
Field Values
checks[].status ok, warn, fail
checks[].remediation Present only when the check is not ok and a fix is known.
logSource The log file read. Absent, with logNote set, when it could not be read.
cells[].classification kukeon or workload
cells[].reason/message kukeond's own description of the state; absent when it recorded none.

Health reports are a kind

A health report is a v1beta1 HealthReport in the kuke-system realm. kukeond stores each report as the validated document under the system realm's metadata tree (<run path>/data/kuke-system/healthreports/<name>), so reports survive a kukeond restart and go with the realm when it is purged. They are operational state, not a system of record: storing a report files nothing anywhere. A report is immutable; it can be stored and deleted, never changed.

The generic verbs work on reports as on any other kind:

kuke get healthreports                    # same as kuke health reports
kuke get healthreport <name|latest>       # one report; -o yaml|json prints the document
kuke apply -f report.yaml                 # same as kuke health report submit -f
kuke delete healthreport <name>           # delete one report

kukeond keeps the newest 50 reports and drops older ones on each submission.

kuke health reports

Lists the reports kukeond stores, newest first: name (the ID column), creation time, and how many findings each has, how many were recurring and how many were filed. -o json prints an array ([] when there are none). kuke get healthreports prints the same.

kuke health report

kuke health report <name> prints one report; latest selects the newest. The default output is markdown for reading. -o json and -o yaml print the stored HealthReport document.

kuke health report submit

kuke health report submit -f <file> validates a HealthReport document and stores it, exactly as kuke apply -f does. -f - reads stdin. The document is JSON or YAML, and unknown fields are rejected.

apiVersion: v1beta1
kind: HealthReport
metadata: { realm: kuke-system } # name is assigned when omitted
spec:
  since: 2026-11-17T09:00:00Z
  until: 2026-11-17T10:00:00Z
  cell: { realm: default, space: default, stack: default, name: sweep-1a2b3c }
  summary: One kukeon defect, one workload failure.
  findings:
    - signature: "cell default/default/default/api Failed"
      classification: kukeon
      severity: error
      title: "api fails to start: CNI attach error"
      evidence:
        - "status.reason: CreateFailed"
      suggestedCommands:
        - "kuke restart api --realm default --space default --stack default"
  body: |
    # Health sweep
    ...
Field Required Notes
apiVersion, kind yes Must be v1beta1 and HealthReport; a report without either is rejected.
metadata.name no kukeond assigns <createdAt as 20060102T150405.000000000Z> when omitted. A stored name, or latest, is rejected. Letters, digits, ., _ and -, at most 128, starting with a letter or digit.
metadata.realm no Always kuke-system; filled when omitted, any other realm is rejected.
spec.createdAt no kukeond sets it when omitted.
spec.since, spec.until yes The digest window the report covers; until must not precede since.
spec.cell yes realm, space, stack and name of the submitting cell.
spec.summary yes
spec.findings yes A list; [] is valid.
spec.body no Markdown.
spec.findings[].signature yes Unique within the report. Identifies the finding across reports.
spec.findings[].classification yes kukeon, workload or unclear.
spec.findings[].severity yes info, warning, error or critical.
spec.findings[].evidence yes At least one entry.
spec.findings[].title no
spec.findings[].count no Occurrences in the window.
spec.findings[].suggestedCommands no Commands for the reader. Nothing runs them.
spec.findings[].issueUrl no An https URL, allowed only on a kukeon finding.
spec.findings[].recurring — Computed by kukeond; a submitted value is ignored.

On submission kukeond marks a finding recurring when the previous stored report already carried the same signature. A hand-started sweep that overlaps a scheduled one therefore reports the same finding as recurring, not as new.

Reports stored before they became a kind (under <run path>/health) are not read or converted, and kukeond removes that directory when it starts.

Filing issues (opt-in)

By default nothing is filed. --file-issues <owner>/<repo> makes kuke first validate the report the way kukeond will (a report kukeond would reject files nothing), then, before it stores the report:

  • open one GitHub issue for each kukeon finding, titled health: <area>: <symptom>, whose body has the symptom, the evidence, the frequency and the kukeon version;
  • add a comment instead when an open issue already carries the finding's signature;
  • record the issue URL in the report.

workload and unclear findings are never filed. Before anything is sent, evidence is stripped of secret values and credential-bearing URLs: known token formats, key=value pairs whose key names a credential, private key blocks and URL userinfo.

Filing needs a GitHub token in the GH_TOKEN environment variable, which the github connector sets once the install enables it for the majordomo role — kuke team connector enable kuke github --role majordomo, or the kuke team's Edit team form (Credentials → Per-role access) — and the gh-token secret exists. The web UI's Health page says, per sweep Config, whether filing has a token. Without it, --file-issues fails naming GH_TOKEN and the opt-in, and the report is still stored. If filing fails, the report is still stored and the command exits 1. If the report cannot be stored after filing ran, the command prints the issues it opened or commented on to stderr and exits 1. See opting in to filing for how an install turns it on. KUKE_HEALTH_GITHUB_API overrides the API base URL for GitHub Enterprise.

Rendering an issue for a diagnosed defect

kuke health issue -f draft.yaml

kuke health issue renders a kukeon defect found outside a sweep, by an interactive majordomo investigation, as the title, body, comment and signature marker a GitHub issue for it carries. It prints JSON and files nothing: the majordomo file-kukeon-bug skill files the result with gh. It uses the same title format, sanitizer and kukeon-health-signature marker as --file-issues, so an issue filed from it and a sweep-filed issue for the same signature dedupe against each other. The value of GH_TOKEN, when set, is redacted as well.

The draft (JSON or YAML; - reads stdin) has the fields below. Unknown fields are rejected, and a draft not classified kukeon is refused.

Field Required Notes
signature yes The sweep's signature when one applies, so the markers match.
classification yes Must be kukeon.
severity yes info, warning, error or critical.
evidence yes At least one entry.
title no The symptom; the signature stands in when empty.
reproduction no Steps or commands that reproduce the defect, rendered as one block.
expected no What the operator expected kukeon to do.
actual no What kukeon did instead.
rootCause no The code that emits the error, such as file:line and the commit.
suggestedFix no The change that would fix the defect.
acceptance no A list of criteria a fix must meet, rendered as - [ ] checkboxes.

The body's sections are Symptom (with Severity), Expected, Actual, Evidence, Reproduction, Root cause, Suggested fix, Acceptance criteria, kukeon version and Signature, followed by the marker. A section whose field is empty is left out, so a draft without the optional fields renders in the sweep's shape. The four prose fields are sanitized and rendered as markdown text, not in a code fence, so file:line references and inline code read normally.

The output has title, body (a new issue's body, ending with the marker), comment (the note for an open issue that already carries the marker) and marker. The kukeon version comes from kukeond, or reads unknown when it is unreachable.

kuke health issue --comment -f notes.md > comment.md

With --comment, the file (- reads stdin) is a hand-written markdown follow-up for an issue that is already open, not a draft. kuke prints it redacted by the same sanitizer, including the GH_TOKEN value, as plain markdown rather than JSON, ready for gh issue comment --body-file. It decodes no draft and contacts nothing; empty or whitespace-only input is an error (comment text is empty).

When to use kuke health vs kuke status

kuke status kuke health
Evaluated by the kuke client kukeond
Run inside a cell host and state rows describe the cell's container describes the host
Covers daemon liveness, host, state, storage, daemon parity host, state, kukeond log errors, failed cells
Needs kukeond no yes

Use kuke status on the host after kuke init, including when kukeond is down. Use kuke health for a running install, and always from inside a cell.