lookout health
“Any issues with this cluster?” in one call: a twelve-category scorecard (control-plane, nodes, crash loops, pending, rollouts, storage, add-ons, quotas, certs, webhooks, Service routing, and disruption readiness) — every category answers healthy|degraded|unavailable, degraded ones with details, and a category whose read RBAC refuses (nodes, certs and webhooks under the built-in view role, which grants no Nodes, Secrets or webhook configurations) answers unavailable with the reason rather than failing the scan. certs also reads cert-manager Certificates where the CRD is served — never issued past a 15m first-issuance grace, renewal failed, or expiring from status.notAfter — and judges the TLS Secret a Certificate writes as that Certificate, not twice. With —store, findings merge the sentinel’s open triage-status records: a scan mid-incident reports the diagnosis and the agent’s severity judgment, not a fresh unknown.
MCP tool: k8s_cluster_health
lookout health [flags]| Flag | Type | Default | Meaning |
|---|---|---|---|
--top | int | 3 | how many findings to name inline on a degraded category’s scorecard line |
--cert-warn | duration | 720h | report TLS certificates (TLS Secrets and cert-manager Certificates) expiring within this window (certs category) |
--store | string | — | path to a sentinel’s SQLite store (its —store file); merges open triage-status records so findings carry triage_* fields and severity reflects the agent’s override |
--store-cluster | string | — | read/write the store for THIS cluster, treating —store as the multi-cluster stem the sentinel was given: —store=/var/lib/lookout/lookout.db —store-cluster=prod-us opens /var/lib/lookout/lookout-prod-us.db (issue #410). Set it only against a sentinel running —clusters/—clusters-from; a single-cluster sentinel writes the literal —store path |
Common flags (every lookout command)
Section titled “Common flags (every lookout command)”| Flag | Type | Default | Meaning |
|---|---|---|---|
--namespace | string | — | limit the scan to one namespace |
-A | bool | — | scan all namespaces |
--workload | string | — | target one workload as <Kind>/<namespace>/<name>, e.g. Deployment/prod/api |
--since | duration | — | how far back to look (0 = command default) |
--format | string | logfmt | output format: logfmt|json (one record per line either way) |
--timeout | duration | 30s | abort the invocation after this long (exit 1) |
--kubeconfig | string | — | path to a kubeconfig file, instead of $KUBECONFIG / ~/.kube/config |
--kubeconfig-dir | string | — | directory of kubeconfig files to fan out across (mutually exclusive with —kubeconfig); each finding is stamped with cluster=<label> and the summary reports clusters=<n> |
--context | string | — | kubeconfig context to read, instead of its current-context. Selects a cluster for THIS invocation only — nothing is written back — so concurrent invocations can target different clusters. Reported as context=<name> in the summary line |
--contexts | string | — | comma-separated kubeconfig contexts to fan out across, or ’*’ for every context in the selected kubeconfig(s) (mutually exclusive with —context); each finding is stamped with cluster=<label> and the summary reports clusters=<n> |
--concurrency | int | 4 | maximum concurrent cluster executions when fanning out with —contexts or —kubeconfig-dir |
--google-auth | string | — | how Google Cloud and GKE DNS requests authenticate: auto (default: honors LOOKOUT_GOOGLE_AUTH, CORE_AGENT_GOOGLE_AUTH, MAST_GOOGLE_AUTH), adc, or injected (static placeholder bearer token, zero GCE metadata lookups) |
--exemptions | string | — | path to a git-reviewed exemption file (YAML); covered findings are ANNOTATED with their reason and expiry and counted as exempt=<n> in the summary, never dropped |
Finding kinds
Section titled “Finding kinds”Every kind= this command can emit, and the severities it carries them at. Nothing else appears in its output; a kind absent from a run means the check looked and found nothing. See the finding-kind glossary for the whole vocabulary.
| Kind | Severity | Claim |
|---|---|---|
health.category | critical, warning, info | one scorecard line: how this category answered — healthy, degraded, or unavailable. The scorecard always answers, so healthy is explicit rather than silent; the line carries the worst severity found inside the category |
pvc.pending | warning | a PersistentVolumeClaim is not bound; pods mounting it cannot start |
pvc.lost | critical | a PersistentVolumeClaim’s bound volume is lost |
cert.expired | critical | a TLS secret’s certificate, or a cert-manager Certificate’s status.notAfter, has expired |
cert.expiring | warning | a TLS secret’s certificate, or a cert-manager Certificate’s status.notAfter, expires within —cert-warn |
cert.invalid | warning | a TLS secret’s tls.crt does not contain a parseable X.509 certificate |
cert.never_issued | critical | a cert-manager Certificate has never been issued (Ready=False, no status.notAfter) past the 15m first-issuance grace, or its first issuance recorded a failure — whatever mounts its Secret has nothing to serve |
cert.renewal_failed | warning | a cert-manager Certificate’s last renewal failed (Ready=False or status.lastFailureTime) while its current certificate is still valid |
pod.crashloop | critical | a container is crash looping |
pod.imagepull | critical | a container cannot pull its image |
pod.waiting | warning | a container is stuck in an error waiting state (CreateContainerConfigError, InvalidImageName, …) |
pod.oomkilled | warning | a container’s last termination was an OOM kill |
pod.restarts | warning | a container has restarted at least —restarts times |
pod.notready | warning | a container in a Running pod has been not-ready past the —pending-age grace, or at any age when the pod had been Ready and a fresh readiness failure took it down (event=Unhealthy) |
pod.probe_flap | warning | a Running container’s readiness keeps failing and recovering — flapping, not down: its readiness failures recur within the last 15m without holding it down, its Ready condition changed within the last 3m45s, and it has not restarted since they began. The read-path counterpart of degradation.probe_flap; status alone reads such a pod as down on half the polls and healthy on the other half. Not held back by —pending-age |
pod.failed | warning | the pod reached phase Failed |
pod.pending | critical, warning | the pod has been Pending longer than —pending-age with no container-level diagnosis, or at any age when a fresh Warning event says it is failing rather than starting (event=); critical when the scheduler has declared it Unschedulable, which is a capacity or constraint problem rather than latency |
workload.replicafailure | critical | the controller cannot create pods at all (quota, PodSecurity, admission) — no pod exists to diagnose |
workload.stalled | critical | a Deployment’s Progressing condition is False: the rollout has given up |
workload.rollout | critical, warning | replicas are short of desired; critical when nothing is serving at all |
job.failed | warning | a Job’s Failed condition is set |
cron.missed | critical, warning | an unsuspended CronJob’s schedule said to run more than —cron-grace ago and status says it did not; critical once several activations in a row are gone |
cron.unparseable | warning | a CronJob’s spec.schedule could not be parsed, so its activations cannot be judged at all |
node.notready | critical | the node’s Ready condition is not True |
node.pressure | critical | the node reports Memory/Disk/PID pressure |
node.condition | critical, warning | a non-standard node condition is True — NPD and its cousins publish problems that way |
node.cordoned | warning | the node is unschedulable but still holds pods: a stuck drain or a forgotten maintenance step |
node.preempt | critical, warning, info | a reclaim taint marks the node for termination; severity tracks how imminent |
pdb.gridlocked | critical, warning | the budget permits no disruptions; critical when healthy pods are already below the required minimum |
addon.degraded | critical, warning | a kube-system add-on (dns, proxy, cni, csi, metrics, connectivity) is short of replicas; critical when none are available |
quota.near | warning | a ResourceQuota resource is at or past —quota-warn percent of its hard limit |
quota.exhausted | critical | a ResourceQuota resource is at its hard limit: the next create is rejected |
cluster.autopilot_idle | info | an Autopilot cluster with no workloads of its own, scaled to 0 nodes by design: its GKE system pods wait for the first workload, and this one finding replaces every finding that state causes in GKE-managed namespaces |
autoscaler.scaleup_blocked | critical, warning, info | pods are unschedulable and this says why the cluster autoscaler has not added a node: the node pools that cannot grow (autoscaling off, maximum 0) and the autoscaler’s own recent refusals, from the cloud provider; critical when no pool can grow, when the only pools that can grow have no node the pods could use (a compute class’s pools, for pods that select no class) and node auto-provisioning is off, or when no node is Ready; warning when a pool is blocked or the autoscaler refused; info when neither. With Nodes and Pods read cluster-wide it also accounts for each node against the pending pods: the taints they do not tolerate (one set on a node alone, with who set it and when), the room left where they could go, the largest requests there, and DaemonSets created in the last 7 days |
webhook.failing_closed | critical | the webhook has no working backend and failurePolicy=Fail: the admissions its rules match are rejected (the message names them; requests it does not match are unaffected) |
webhook.dead_backend | warning | the webhook’s service backend is missing, has no ready endpoints, or does not serve the named port |
webhook.slow_risk | info | the webhook’s timeout is long enough to slow every gated write if the backend degrades |
webhook.ca_expired | critical | the webhook’s caBundle has expired: the API server cannot verify it |
webhook.ca_expiring | warning | the webhook’s caBundle expires within —cert-warn |
perf.apiserver_p99 | critical, warning | apiserver request latency p99 crossed the pack threshold for a verb/resource — warning from 1s, critical from 4s |
perf.pack_unavailable | warning | a metric the requested pack needs is not in the metrics workspace, so part of the pack could not run; the rest still did (no coverage lies) |
edge.missing_ref | critical | a referenced ConfigMap, Secret, ServiceAccount, TLS secret, IngressClass, StorageClass, or governing Service does not exist |
edge.unclassed | warning | the Ingress names no class and no IngressClass declares itself the cluster default — no controller will claim it |
edge.selector_empty | critical, info | a Service selector selects zero pods, so the service routes nowhere; info, not critical, when every workload it matches is scaled to zero on purpose |
edge.backend_missing | critical | an Ingress backend service, or the port it names, does not exist |
Output fields
Section titled “Output fields”Beyond the shared envelope fields (kind, severity, namespace, kind_of_object, name, reason, message, fingerprint, exempt_reason, exempt_expires):
| Field | Meaning |
|---|---|
category | scorecard category the finding belongs to (on health.category: which category this line scores) |
status | category status: healthy|degraded|unavailable (the scorecard always answers — healthy is explicit). A category whose findings are all info scores healthy and still names them in total/top |
total | findings in a category: degraded, or healthy with only info findings |
top | worst findings of a category inline, as kind[ namespace/name]; capped by —top |
unverified | on a healthy or degraded scorecard line: the part of the category that could not be checked and why, e.g. Ingress TLS secret references when list secrets is forbidden — the verdict covers everything else. A category whose core read is refused answers unavailable instead, with the reason as its message |
idle_folded | on a healthy scorecard line of an idle Autopilot cluster: the findings in this category the leading cluster.autopilot_idle finding explains — GKE’s own pods and webhooks waiting, by design, for a first workload to bring a node up — counted rather than reported (#735) |
subject | TLS certificate subject (CN when set); never key material |
not_after | TLS certificate NotAfter (a cert-manager Certificate’s status.notAfter), RFC 3339 |
secret | on a cert-manager Certificate finding: the TLS Secret it writes (spec.secretName), which is not judged again as a Secret |
days_left | whole days until NotAfter (negative = expired) |
phase | PersistentVolumeClaim phase on storage findings (Pending or Lost) |
webhook | admission webhook as <configuration>/<webhook name> |
service | service backend a webhook points at, as <namespace>/<name> |
backend | why a webhook backend is dead: service missing, no ready endpoints, or port <p> not on service |
gates | namespaces a webhook gates, from namespaceSelector: all namespaces, or <matched>/<total> namespaces with up to 5 names |
rules | compact operations/resources summary of a webhook’s rules, e.g. “CREATE,UPDATE pods,deployments.apps” |
object_selector | a webhook’s objectSelector, when one is set |
timeout | webhook timeoutSeconds as <n>s (nil defaults to the API’s 10s) |
triage_status | triage state from the matched record (investigating|triaged|actioned|escalated) — present only with —store on merged findings |
triage_root_cause | the incident agent’s root-cause hypothesis, from the matched triage-status record |
triage_action | the incident agent’s paper trail (PRs opened, escalations), from the matched triage-status record |
triage_session | incident session that wrote the matched triage-status record |
triage_age | how long ago the matched triage-status record was last updated |
container | container the finding is about (init containers prefixed init:) |
image | image reference that failed to pull |
restarts | container restart count |
exit_code | exit code of the container’s last termination |
last_state | reason of the container’s last termination (e.g. OOMKilled) |
age | how long the abnormal state has persisted (on pod.probe_flap: since the first readiness failure the kubelet recorded) |
event | on pod.pending and pod.notready: the reason of the fresh Warning event that says the pod is failing rather than starting — FailedScheduling, FailedMount, FailedAttachVolume, FailedCreatePodSandBox, ImagePullBackOff (any pull failure) or Unhealthy; the event’s message becomes the finding’s when status has none. Its presence is what reports a pod younger than —pending-age |
readiness | on pod.probe_flap: the pod’s Ready condition at this read, Ready or NotReady — one sample of a state that keeps changing |
last_flip | on pod.probe_flap: how long ago the pod’s Ready condition last changed |
probe_failures | on pod.probe_flap: readiness failures the kubelet’s Unhealthy events recorded — a floor, since the kubelet’s event spam filter stops counting after a burst of 25 |
period_seconds | the probe’s periodSeconds (default 10); on pod.probe_flap, the readiness probe whose failures were counted |
desired | desired replica/scheduled count from spec |
ready | ready count from status |
updated | updated-to-current-revision count from status |
available | available count from status |
failed | failed pod count of a Job |
schedule | a CronJob’s spec.schedule |
expected | the activation a CronJob should have run and did not |
missed_runs | activations missed since the anchor; ≥N when the walk was capped |
anchor | what the missed count was measured from: last_schedule or creation |
time_zone | a CronJob’s spec.timeZone, when set |
last_schedule | a CronJob’s status.lastScheduleTime, or never |
active_jobs | Jobs a CronJob still has running |
condition | node condition type that is abnormal; for an HPA, the False condition (AbleToScale=False or ScalingActive=False) |
taint | taint key indicating reclaim/drain |
pods | pods affected (behind a cordoned node or a PDB) |
healthy | currently healthy pods behind a PDB |
required | pods the PDB requires healthy |
addon | system add-on role: dns, proxy, cni, csi, metrics, connectivity |
resource | ResourceQuota resource name at or near its limit |
used | quota usage from status |
hard | quota hard limit from status |
pct | quota usage as percent of the hard limit |
scale_target | an HPA’s scaleTargetRef as Kind/name |
replicas | an HPA’s current replica count, where the failure holds it |
audit_reason | the audit.hpa_cannot_scale reason (HPATargetMissing, HPATargetMissingRequests) that is the structural cause of this failure, when the controller’s message identifies one |
nodes | on autoscaler.scaleup_blocked and cluster.autopilot_idle: Ready/total Nodes in the cluster, when nodes were read |
autopilot | on autoscaler.scaleup_blocked and cluster.autopilot_idle: true for a GKE Autopilot cluster, whose capacity the provider manages |
pools | on autoscaler.scaleup_blocked: every node pool as name (autoscaling bounds, node count, why it cannot grow) |
no_scale_up | on autoscaler.scaleup_blocked: the autoscaler’s noScaleUp refusals in the window, as [pool: ]reason ×count, most frequent first |
window | on autoscaler.scaleup_blocked: how far back autoscaler decisions were read |
decisions | on autoscaler.scaleup_blocked: why the autoscaler’s decisions could not be read, when they could not |
auto_provisioning | on autoscaler.scaleup_blocked: enabled|disabled, whether the autoscaler may create new node pools for pods no pool fits (GKE node auto-provisioning). Disabled, pods that select no compute class can only land in the pools that exist; a compute class’s pools take only pods that select it |
taints | on autoscaler.scaleup_blocked: the node taints no pending pod tolerates, as key=value:effect on the nodes carrying it, operator-set taints first; a compute class’s taint says only pods selecting the class may use those nodes. The message names a taint set on a node alone rather than by its pool, with the managedFields manager and time that last wrote the node’s taints |
full_nodes | on autoscaler.scaleup_blocked: nodes the pending pods could otherwise use but lack room on, with CPU and memory free of allocatable by requests, and the smallest pending request |
largest_requests | on autoscaler.scaleup_blocked: the largest CPU requests on those full nodes, a DaemonSet named once (marked when created within the last 7 days) |
new_daemonsets | on autoscaler.scaleup_blocked: DaemonSets created within the last 7 days, with their per-pod request, node count and age — capacity taken from every node |
folded | on cluster.autopilot_idle: how many findings the idle state explains, replaced by this one |
namespaces | on cluster.autopilot_idle: the GKE-managed namespaces those findings were in |
autoscaler | summary note: why unschedulable pods could not be explained (no cloud provider, or no permission to read node pools) |
young | summary note: pods left unjudged because they are younger than the —pending-age grace (default 5m) — Pending, or Running with a not-ready container — and no fresh Warning event says why; omitted at 0. Those pods are too new to call, not healthy: lookout triage delta --pending-age=0 judges them now |
workload | the target the edges were traced from as <Kind>/<namespace>/<name>, stamped on every finding — a workload, or the Service itself when entered from the service side |
likely_workload | on a Service-entry edge.selector_empty: the workload in that namespace whose pod labels best fit the broken selector, i.e. the one it was probably meant to select. Absent when two workloads fit equally well, because then naming one would be a guess |
scaled_to_zero | on an info edge.selector_empty (reason BackendScaledToZero): the Deployments or StatefulSets the selector matches, as <Kind>/<name>, every one of them asking for zero replicas. The Service routes nowhere until one scales up, but nothing is misconfigured |
env | environment variable whose valueFrom reference is broken |
volume | pod volume, or StatefulSet volumeClaimTemplate, whose reference is broken |
key | the referenced key that is missing from the ConfigMap/Secret |
selector | the Service label selector under scrutiny |
selected | pods the Service selector currently selects |
endpoints | total endpoints across the Service’s EndpointSlices |
slices | how many EndpointSlices back the Service |
pod | pod named by an orphaned endpoint targetRef |
sans | TLS certificate subject alternative names (DNS, then IP, URI, email), comma-separated, the first 5 then +N more; omitted when the certificate has none |
referenced_by | on a certificate finding from the target-free TLS Secret sweep: what in the Secret’s namespace references it, as <Kind>/<name> — workloads by pod template, pods no workload owns, Ingresses by tls — the first 5 then +N more. none = no pod volume, projected volume, env, envFrom or Ingress tls names it (its consumer is outside the cluster, or a Gateway listener, which this pass does not read); unknown = a List those references come from was refused |
via | how the broken reference is reached from the workload: mount, ingress, or imagePullSecret; absent on the TLS Secret sweep’s findings, which carry referenced_by instead |
ingress | Ingress referencing the TLS secret, or the unserved Ingress itself |
host | Ingress rule host of the broken backend (empty for the default backend) |
path | Ingress rule path of the broken backend |
port | Service port (name or number) the Ingress backend asks for |
service_account | ServiceAccount the RBAC finding is about, or the one contributing an imagePullSecret |
role_ref | dangling roleRef as <Kind>/<name> |
pack | the pack this finding belongs to; also the summary-line note naming the pack that ran |
metric | the backend-neutral metric the query measured (pack_unavailable: the absent metric) |
verb | apiserver request verb for this series (apiserver pack) |
observed | the worst (maximum) aligned value in the window, in the query’s unit — the breach basis |
latest | the newest aligned value in the window |
threshold | the crossed threshold: the critical one when severity=critical, else the warning one |
Output contract
Section titled “Output contract”Output: one finding per line (logfmt; —format=json for one JSON object
per line), keys in fixed order; healthy resources emit nothing. The final
line is always the summary: scanned=
Examples
Section titled “Examples”lookout healthlookout health --format=json --top=5lookout health --namespace=prod