Skip to content

lookout triage spec

Read ONE resource’s spec: kubectl describe, but token-dense, secret-safe, and default-elided — healthy conditions are omitted.

MCP tool: k8s_resource_spec

Terminal window
lookout triage spec <Kind>/[<namespace>/]<name> [flags]

<Kind>/[<namespace>/]<name> — the resource to read; Kind is case-insensitive, accepts the aliases po=Pod, deploy=Deployment, rs=ReplicaSet, sts=StatefulSet, ds=DaemonSet, svc=Service, cm=ConfigMap, pvc=PersistentVolumeClaim, ing=Ingress, netpol=NetworkPolicy, no=Node, and unlisted kinds (CRDs) resolve via API discovery (qualify as <Kind>.<group> if ambiguous). Omit <namespace> for cluster-scoped kinds, or to use —namespace (falling back to “default”). —workload=<Kind>/<ns>/<name> is the flag-shaped alternative.

FlagTypeDefaultMeaning
--diffbool—diff against the previous graph-history revision — requires a sentinel store; not yet implemented
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)
--timeoutduration10sabort the invocation after this long (exit 1)
--kubeconfigstring—path to a kubeconfig file, instead of $KUBECONFIG / ~/.kube/config
--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
--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
spec.resourceinfothe object itself: metadata, owner, and the kind-specific highlights (one per target)
spec.containerinfoone container of the target: image, resources, ports, probes, env (one per container)
spec.conditionwarninga status condition of the target that is not in its nominal state

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

FieldMeaning
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
service_accountpod’s service account
volumespod volumes as name:source (source names its referent, never its payload)
containercontainer name (one spec.container finding per container)
init“true” when the container is an init container
imagecontainer image reference
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: sanitized spec flattened to path=value pairs

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 triage spec Deployment/prod/api
lookout triage spec po/payments-api-7d9c4b-x2n8p --namespace=prod
lookout triage spec Node/gke-prod-pool-1-8f2a
lookout triage spec Certificate/prod/api-tls --format=json
lookout triage spec --workload=Deployment/prod/api