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
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.
| Flag | Type | Default | Meaning |
|---|---|---|---|
--diff | bool | — | diff against the previous graph-history revision — requires a sentinel store; not yet implemented |
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 | 10s | 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 |
|---|---|---|
spec.resource | info | the object itself: metadata, owner, and the kind-specific highlights (one per target) |
spec.pod_template | info | a 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.container | info | one container of the target: image, command and args, resources, ports, probes, env, mounts (one per container) |
spec.condition | warning | a status condition of the target that is not in its nominal state |
read.unavailable | info | a 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 |
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 |
|---|---|
labels | resource labels as sorted k=v pairs |
owner | controlling owner as Kind/name |
phase | status.phase, only when abnormal for the kind (zero nominal state) |
node | node the pod is scheduled on |
service_account | pod’s service account (a Pod’s spec.resource, a controller’s spec.pod_template) |
volumes | pod 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_secrets | the pod spec’s imagePullSecrets as Secret names, comma-separated — the ones inherited from the ServiceAccount are not in any spec (state edges checks those) |
container | container name (one spec.container finding per container) |
init | “true” when the container is an init container |
image | container image reference |
command | the 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 |
args | the container’s args, rendered and sanitized like command |
mounts | the container’s volumeMounts as volume[/subPath]:mountPath[:ro]; the volume’s source is in volumes |
requests | resource requests as sorted k=v pairs |
limits | resource limits as sorted k=v pairs |
ports | container or service ports, compact ([name:]port[->target][/proto]) |
liveness | liveness probe one-liner (kind, target, non-default timings) |
readiness | readiness probe one-liner |
env | env vars; literal credential values are [REDACTED], valueFrom entries render as named references |
env_from | envFrom sources as kind:name |
replicas | desired replica count |
strategy | rollout strategy summary (type + non-default knobs) |
selector | workload/service selector as sorted k=v pairs |
type | Service or Secret type, only when non-default |
external_name | ExternalName service target |
session_affinity | service session affinity, only when not None |
keys | ConfigMap/Secret data KEYS with byte sizes — values are never rendered |
condition | abnormal status condition as Type=Status |
since | the condition’s lastTransitionTime |
spec | kinds without a dedicated renderer, and Node: sanitized spec flattened to path=value pairs |
kubelet | Node: kubelet version |
runtime | Node: container runtime version |
allocatable | Node: allocatable cpu, memory and pods as name:quantity pairs |
capacity | Node: capacity cpu, memory and pods as name:quantity pairs |
resource | read.unavailable: the resource that could not be read, as resource[.group] |
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 triage spec Deployment/prod/apilookout triage spec po/payments-api-7d9c4b-x2n8p --namespace=prodlookout triage spec Node/gke-prod-pool-1-8f2alookout triage spec Certificate/prod/api-tls --format=jsonlookout triage spec --workload=Deployment/prod/api