Skip to content

lookout bundle

The first call of every incident: one correlated snapshot of a workload — sanitized spec, everything abnormal, event timeline, broken dependency edges, blast radius, distilled logs — sectioned into a single payload instead of 5–6 separate reads. The spec carries command/args, pull secrets, volumes and mounts; delta carries the last revisions for a rollback; routine Normal events and healthy neighbors are summarized, not listed (verbose lists every row).

MCP tool: k8s_triage_workload (MCP profile: triage)

Terminal window
lookout bundle [flags]
FlagTypeDefaultMeaning
--incidentstring—inject payload JSON (the message a lookout-watch incident session starts with); its object reference resolves to the target workload via the owner chain, or for a Service via its selector — alternative to —workload
--depthint2blast-radius traversal depth: graph edges followed per direction in the radius section
--max-templatesint15cap distilled log template clusters in the logs section (triage logs defaults to 40; the bundle keeps the tighter budget)
--cert-warnduration720hreport TLS certificates expiring within this window (edges section)
--storestring—path to a sentinel’s SQLite store (its —store file); merges open triage-status records so the bundle’s findings carry triage_* fields and severity reflects the agent’s override
--store-clusterstring—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
--listsstringallwhich cluster resources the List pass reads: ‘all’ (default), a comma-separated allowlist (pods,deployments), or subtractions (all,-secrets) for a least-privilege posture. Denied or deselected lists degrade to a partial bundle with a skipped= note on the head, never an error.
--lists-preflightbool—before listing, SelfSubjectAccessReview each selected resource and drop the denied ones proactively (fewer 403s); falls back to reactive Forbidden-skip if SSAR is not permitted
--verbosebool—list every row: one event.normal line per Normal event family instead of one event.normal_summary per object, and one radius.neighbor line per healthy neighbor instead of the radius.healthy summary (the output before #885)
FlagTypeDefaultMeaning
--namespacestring—limit the scan to one namespace
-Abool—scan all namespaces
--workloadstring—target one workload as <Kind>/<namespace>/<name>, e.g. Deployment/prod/api
--sinceduration—how far back to look (0 = command default)
--formatstringlogfmtoutput format: logfmt|json (one record per line either way)
--timeoutduration30sabort the invocation after this long (exit 1)
--kubeconfigstring—path to a kubeconfig file, instead of $KUBECONFIG / ~/.kube/config
--kubeconfig-dirstring—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>
--contextstring—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
--contextsstring—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>
--concurrencyint4maximum concurrent cluster executions when fanning out with —contexts or —kubeconfig-dir
--google-authstring—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)
--exemptionsstring—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

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.

KindSeverityClaim
bundle.targetinfothe head record: which workload the bundle is about and which sections follow
rollout.revisioninfodelta section, Deployment targets: one recent revision of the pod template, from its ReplicaSet, newest first and at most 3 — images, desired/ready replicas, age, and which template fields changed from the revision before (names, never values)
event.normal_summaryinfoevents section, default (not —verbose): one object’s routine Normal events folded into one line — summed count, reason names, first/last seen; rollout-relevant Normal reasons (ScalingReplicaSet, Killing, DeploymentRollback, Preempted, TriggeredScaleUp, NotTriggerScaleUp, …) stay expanded as event.normal
radius.healthyinforadius section, default (not —verbose): the neighbors judged healthy, counted by kind instead of listed — a neighbor is folded only when its own status says healthy and no delta or edges finding names it; anything unjudgeable stays a radius.neighbor line
radius.neighborinfoone object in the target’s neighborhood, with its direction, relation, and hop distance — an enumeration of impact, not a defect
radius.missingwarninga neighbor the graph references but never observed, in a kind the snapshot does watch: the reference is dangling
spec.resourceinfothe object itself: metadata, owner, and the kind-specific highlights (one per target)
spec.pod_templateinfoa workload controller’s pod template, pod-level: ServiceAccount, imagePullSecrets, and volumes with the ConfigMap/Secret/PVC each names — references only; omitted when the template sets none
spec.containerinfoone container of the target: image, command and args, resources, ports, probes, env, mounts (one per container)
spec.conditionwarninga status condition of the target that is not in its nominal state
pod.crashloopcriticala container is crash looping
pod.imagepullcriticala container cannot pull its image
pod.waitingwarninga container is stuck in an error waiting state (CreateContainerConfigError, InvalidImageName, …)
pod.oomkilledwarninga container’s last termination was an OOM kill
pod.restartswarninga container has restarted at least —restarts times
pod.notreadywarninga 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_flapwarninga 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.failedwarningthe pod reached phase Failed
pod.pendingcritical, warningthe 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.replicafailurecriticalthe controller cannot create pods at all (quota, PodSecurity, admission) — no pod exists to diagnose
workload.stalledcriticala Deployment’s Progressing condition is False: the rollout has given up
workload.rolloutcritical, warningreplicas are short of desired; critical when nothing is serving at all
job.failedwarninga Job’s Failed condition is set
cron.missedcritical, warningan 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.unparseablewarninga CronJob’s spec.schedule could not be parsed, so its activations cannot be judged at all
node.notreadycriticalthe node’s Ready condition is not True
node.pressurecriticalthe node reports Memory/Disk/PID pressure
node.conditioncritical, warninga non-standard node condition is True — NPD and its cousins publish problems that way
node.cordonedwarningthe node is unschedulable but still holds pods: a stuck drain or a forgotten maintenance step
node.preemptcritical, warning, infoa reclaim taint marks the node for termination; severity tracks how imminent
pdb.gridlockedcritical, warningthe budget permits no disruptions; critical when healthy pods are already below the required minimum
addon.degradedcritical, warninga kube-system add-on (dns, proxy, cni, csi, metrics, connectivity) is short of replicas; critical when none are available
quota.nearwarninga ResourceQuota resource is at or past —quota-warn percent of its hard limit
quota.exhaustedcriticala ResourceQuota resource is at its hard limit: the next create is rejected
cluster.autopilot_idleinfoan 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_blockedcritical, warning, infopods 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
event.warningwarningone collapsed timeline entry for a Warning-type event family on a subject
event.normalinfoone collapsed timeline entry for a Normal-type event family — context for the warnings around it, not a problem on its own
log.templatecritical, warning, infoone distilled template and how many lines collapsed into it; severity is the guessed level — critical at fatal, warning for error-ish, info otherwise
log.stacktracecritical, warning, infoa template that is a Go panic, Java exception, or Python traceback, with its innermost frames
log.overflowinfothe low-count tail —max-templates dropped, counted rather than discarded silently (no coverage lies)
log.probe_noiseinfohealth/readiness probe request lines stripped before distillation, counted so the removal is visible
log.fetch_errorwarninga container’s log stream could not be read, so its lines are missing from the distillation
edge.missing_refcriticala referenced ConfigMap, Secret, ServiceAccount, TLS secret, IngressClass, StorageClass, or governing Service does not exist
edge.missing_keycriticalthe referenced key is absent from an existing ConfigMap/Secret
edge.invalid_refwarningthe referenced object exists but is the wrong type to serve the reference
edge.unclassedwarningthe Ingress names no class and no IngressClass declares itself the cluster default — no controller will claim it
edge.selector_emptycritical, infoa 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.selector_unreadycritical, warningthe Service selects pods but some are not Ready; critical when none are
edge.endpoints_missingcriticala selecting Service has no EndpointSlices at all
edge.endpoints_orphanedwarningan endpoint targetRef names a pod that no longer exists
edge.endpoints_unreadycritical, warningthe endpoint ready-count disagrees with the selected pods (stale or lagging slices); critical at zero ready
edge.backend_missingcriticalan Ingress backend service, or the port it names, does not exist
edge.cert_expiredcritical, warninga TLS certificate’s NotAfter is in the past (a bundle is judged by its earliest-expiring certificate); warning instead of critical when the target-free TLS Secret sweep finds nothing in the cluster referencing the Secret (referenced_by=none)
edge.cert_expiringwarninga TLS certificate expires within —cert-warn — one a workload or Ingress reaches, or, in the target-free sweep, any kubernetes.io/tls Secret in scope, referenced or not
edge.cert_invalidwarning, infotls.crt is missing or unparseable, or the secret is not kubernetes.io/tls; info instead of warning when the target-free TLS Secret sweep finds nothing referencing the Secret
edge.rbac_danglingwarninga (Cluster)RoleBinding for the workload’s ServiceAccount points at a missing (Cluster)Role

Beyond the shared envelope fields (kind, severity, namespace, kind_of_object, name, reason, message, fingerprint, exempt_reason, exempt_expires):

FieldMeaning
sectionwhich bundle section the finding belongs to: spec|delta|events|edges|radius|logs
sectionson the bundle.target head finding: the sections that follow
resolved_fromon the bundle.target head finding: the target as it was given, when the bundle is about a different object — a Service resolves to the one workload its selector selects, and a Pod name that matches no pod resolves to the one workload of that name in that namespace
skippedon the bundle.target head finding: comma-separated resources the List pass could not read (denied) or was told to omit (—lists) — the bundle is a documented partial, secret-free by default under a least-privilege role. When a List was refused, the head’s message names each refusal, why this identity lacks it, and the grant that fixes it
relationradius neighbor’s relation to the target: upstream (routes/owns/governs it), downstream (it points at), lateral (shares a node/volume/config)
hopradius neighbor’s BFS depth from the target (1 = direct edge)
observedunknown on a radius neighbor whose kind the bundle’s List pass could not read (skipped= names it): it is referenced, and nothing is claimed about whether it exists
viaon a radius ConfigMap/Secret neighbor: how the target’s pods reach it — env, envFrom, volume, imagePullSecret, comma-joined when more than one; on an edges finding: how the broken reference is reached from the workload — mount, ingress, or imagePullSecret
service_accountpod’s service account (a Pod’s spec.resource, a controller’s spec.pod_template); on a radius or edges imagePullSecret, the ServiceAccount contributing it, when the pod spec does not name it itself; on an RBAC edges finding, the ServiceAccount it is about
neighborson radius.healthy: how many neighbors were judged healthy and folded into it
kindson radius.healthy: the folded neighbors by kind, as Kind:count pairs
reasonson event.normal_summary: the Normal reason families folded into it, sorted
revisionon rollout.revision: the ReplicaSet’s deployment.kubernetes.io/revision
currenton rollout.revision: “true” on the newest revision, the one the Deployment is rolling to or running
imageson rollout.revision: the revision’s container images, in container order
changedon rollout.revision: pod-template fields that differ from the revision listed after it, as rendered by the spec section — pod-level fields bare (volumes, image_pull_secrets, service_account), container fields as container:field (image, command, args, env, resources, …), an added or removed container as +name / -name; names only, never values
ageon a delta finding: how long the abnormal state has persisted; on rollout.revision: time since the ReplicaSet was created
triage_statustriage state from the matched record (investigating|triaged|actioned|escalated) — present only with —store on merged findings
triage_root_causethe incident agent’s root-cause hypothesis, from the matched triage-status record
triage_actionthe incident agent’s paper trail (PRs opened, escalations), from the matched triage-status record
triage_sessionincident session that wrote the matched triage-status record
triage_agehow long ago the matched triage-status record was last updated
labelsresource labels as sorted k=v pairs
ownercontrolling owner as Kind/name
phasestatus.phase, only when abnormal for the kind (zero nominal state)
nodenode the pod is scheduled on
volumespod volumes as name:source (source names its referent, never its payload) — on a Pod’s spec.resource and a controller’s spec.pod_template
image_pull_secretsthe pod spec’s imagePullSecrets as Secret names, comma-separated — the ones inherited from the ServiceAccount are not in any spec (state edges checks those)
containercontainer name (one spec.container finding per container)
init“true” when the container is an init container
imagecontainer image reference
commandthe container’s command (entrypoint override), space-joined with an element quoted when it holds spaces or quotes; sanitized like env (credential flags and secret-shaped elements are [REDACTED]) and cut at 240 bytes with …; omitted when the image’s own entrypoint runs
argsthe container’s args, rendered and sanitized like command
mountsthe container’s volumeMounts as volume[/subPath]:mountPath[:ro]; the volume’s source is in volumes
requestsresource requests as sorted k=v pairs
limitsresource limits as sorted k=v pairs
portscontainer or service ports, compact ([name:]port[->target][/proto])
livenessliveness probe one-liner (kind, target, non-default timings)
readinessreadiness probe one-liner
envenv vars; literal credential values are [REDACTED], valueFrom entries render as named references
env_fromenvFrom sources as kind:name
replicasdesired replica count
strategyrollout strategy summary (type + non-default knobs)
selectorworkload/service selector as sorted k=v pairs
typeService or Secret type, only when non-default
external_nameExternalName service target
session_affinityservice session affinity, only when not None
keysConfigMap/Secret data KEYS with byte sizes — values are never rendered
conditionabnormal status condition as Type=Status
sincethe condition’s lastTransitionTime
speckinds without a dedicated renderer, and Node: sanitized spec flattened to path=value pairs
kubeletNode: kubelet version
runtimeNode: container runtime version
allocatableNode: allocatable cpu, memory and pods as name:quantity pairs
capacityNode: capacity cpu, memory and pods as name:quantity pairs
restartscontainer restart count
exit_codeexit code of the container’s last termination
last_statereason of the container’s last termination (e.g. OOMKilled)
eventon 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
last_flipon pod.probe_flap: how long ago the pod’s Ready condition last changed
probe_failureson 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_secondsthe probe’s periodSeconds (default 10); on pod.probe_flap, the readiness probe whose failures were counted
desireddesired replica/scheduled count from spec
readyready count from status
updatedupdated-to-current-revision count from status
availableavailable count from status
failedfailed pod count of a Job
schedulea CronJob’s spec.schedule
expectedthe activation a CronJob should have run and did not
missed_runsactivations missed since the anchor; ≥N when the walk was capped
anchorwhat the missed count was measured from: last_schedule or creation
time_zonea CronJob’s spec.timeZone, when set
last_schedulea CronJob’s status.lastScheduleTime, or never
active_jobsJobs a CronJob still has running
tainttaint key indicating reclaim/drain
podspods affected (behind a cordoned node or a PDB)
healthycurrently healthy pods behind a PDB
requiredpods the PDB requires healthy
addonsystem add-on role: dns, proxy, cni, csi, metrics, connectivity
resourceResourceQuota resource name at or near its limit
usedquota usage from status
hardquota hard limit from status
pctquota usage as percent of the hard limit
scale_targetan HPA’s scaleTargetRef as Kind/name
audit_reasonthe audit.hpa_cannot_scale reason (HPATargetMissing, HPATargetMissingRequests) that is the structural cause of this failure, when the controller’s message identifies one
nodeson autoscaler.scaleup_blocked and cluster.autopilot_idle: Ready/total Nodes in the cluster, when nodes were read
autopiloton autoscaler.scaleup_blocked and cluster.autopilot_idle: true for a GKE Autopilot cluster, whose capacity the provider manages
poolson autoscaler.scaleup_blocked: every node pool as name (autoscaling bounds, node count, why it cannot grow)
no_scale_upon autoscaler.scaleup_blocked: the autoscaler’s noScaleUp refusals in the window, as [pool: ]reason ×count, most frequent first
windowon autoscaler.scaleup_blocked: how far back autoscaler decisions were read
decisionson autoscaler.scaleup_blocked: why the autoscaler’s decisions could not be read, when they could not
auto_provisioningon 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
taintson 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_nodeson 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_requestson autoscaler.scaleup_blocked: the largest CPU requests on those full nodes, a DaemonSet named once (marked when created within the last 7 days)
new_daemonsetson autoscaler.scaleup_blocked: DaemonSets created within the last 7 days, with their per-pod request, node count and age — capacity taken from every node
foldedon cluster.autopilot_idle: how many findings the idle state explains, replaced by this one
namespaceson cluster.autopilot_idle: the GKE-managed namespaces those findings were in
autoscalersummary note: why unschedulable pods could not be explained (no cloud provider, or no permission to read node pools)
youngsummary 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
countevents collapsed into this timeline entry: k8s per-event repeat counts summed across the entry’s reason family
first_seenRFC3339 timestamp of the entry’s oldest activity
last_seenRFC3339 timestamp of the entry’s newest activity (the timeline sort key)
sourcereporting component (kubelet, horizontal-pod-autoscaler, …)
variantsraw Event.Reason values collapsed into this entry, comma-separated (present only when a reason family merged more than one)
objectson a rolled-up entry (namespace and -A timelines): how many objects share this owner and reason; the name is then <owner>-* for pods (the owner their generated names encode) or * for Nodes, and the message is the newest member’s, prefixed with the count. A pod owner’s Normal start events (Scheduled, Pulling, Pulled, Created, Started) fold into one entry with reason PodsStarted, and its stop events (Killing, ScaleDown, Preempting) into PodsStopped, with the folded reasons in variants; Normal events on DaemonSets, ReplicaSets, Jobs and StatefulSets roll up across objects of the kind as * (their warnings stay per object); objects counts distinct objects
exampleson a rolled-up entry: the newest member objects’ names, comma-separated (3; 5 for warnings); —per-object or —workload lists every object
flipsevent.hpa_thrash: most scale-direction changes observed inside one —hpa-window
targetevent.hpa_thrash: the HPA’s scaleTargetRef as Kind/name (when the HPA object was readable)
templatelog template; <*> marks positions that varied across merged lines
levelguessed log level (fatal|error|warn|info|debug) from token/field match
langstack-trace runtime on log.stacktrace findings: go|java|python
framestop stack frames on log.stacktrace findings, innermost first, ’ < ’ separated
sampleone representative raw line, truncated and sanitized
omitted_templatesclusters dropped by —max-templates (log.overflow only)
omitted_lineslines inside the dropped clusters (log.overflow only)
workloadthe 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_workloadon 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_zeroon 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
volumepod volume, or StatefulSet volumeClaimTemplate, whose reference is broken
keythe referenced key that is missing from the ConfigMap/Secret
selectedpods the Service selector currently selects
endpointstotal endpoints across the Service’s EndpointSlices
sliceshow many EndpointSlices back the Service
servicethe Service a slice, Ingress backend, or StatefulSet serviceName refers to
podpod named by an orphaned endpoint targetRef
subjectTLS certificate subject (CN when set); never key material
sansTLS certificate subject alternative names (DNS, then IP, URI, email), comma-separated, the first 5 then +N more; omitted when the certificate has none
referenced_byon 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
not_afterTLS certificate NotAfter, RFC 3339
days_leftwhole days until NotAfter (negative = expired)
ingressIngress referencing the TLS secret, or the unserved Ingress itself
hostIngress rule host of the broken backend (empty for the default backend)
pathIngress rule path of the broken backend
portService port (name or number) the Ingress backend asks for
role_refdangling roleRef as <Kind>/<name>

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= findings= elapsed= — findings=0 with a summary present means “scanned and healthy”; a stream without a summary line is void. Exit 0 data, 1 runtime error (diagnostics on stderr only), 2 usage.

Terminal window
lookout bundle --workload=Deployment/prod/api
lookout bundle --workload=StatefulSet/db/postgres --since=30m --format=json
lookout bundle --workload=Deployment/prod/api --verbose
lookout bundle --incident='{"namespace":"prod","kind_of_object":"Pod","name":"api-6d5f8c-x2v9k"}'