Skip to content

lookout state keda

When a KEDA-scaled workload stops scaling — report every ScaledObject or ScaledJob whose target is gone, whose trigger authentication does not exist, or that KEDA itself reports not Ready. Silent, and cheap, on clusters without KEDA installed.

MCP tool: k8s_keda_scalers

Terminal window
lookout state keda [flags]
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
keda.missing_targetwarningthe ScaledObject’s scaleTargetRef names a Deployment or StatefulSet that does not exist — nothing is being scaled
keda.missing_authwarninga trigger’s authenticationRef names a TriggerAuthentication or ClusterTriggerAuthentication that does not exist — the scaler cannot read its metric
keda.not_readywarningKEDA reports the scaler Ready=False: scaling has stopped at the current size
crd.unavailableinfothe API group this check reads is not served by the cluster, so nothing was examined (no coverage lies)

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

FieldMeaning
targetthe scaleTargetRef the ScaledObject names, as <Kind>/<name>
triggertrigger type (prometheus, kafka, …) whose authenticationRef does not resolve
authenticationthe authenticationRef that does not resolve, as <Kind>/<name>
conditionthe status condition that is not True
api_groupcrd.unavailable: the API group-version this command needed
resourcescrd.unavailable: the resources it would have read
unavailablesummary-line note: why the group could not be read (absent CRDs, or discovery denied)

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 state keda
lookout state keda --namespace=prod
lookout state keda --format=json