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
--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
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
read.unavailableinfoa resource this command reads was refused (RBAC forbidden, e.g. Nodes, Secrets or RBAC objects under the built-in view role) or is not served, so the checks that need it did not run and their silence is not a clean bill; everything else was still verified. The message names the refused verb and resource, whether it is cluster-scoped, whether the built-in view role grants it, and the grant that fixes it; resource= carries the refused resource as resource[.group] — an explicit degradation record, never silence

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 (a Pod’s spec.resource, a controller’s spec.pod_template)
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
resourceread.unavailable: the resource that could not be read, as resource[.group]

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