lookout stab scaledown
On a cluster-autoscaled cluster, which underused nodes the autoscaler cannot remove and what pins each one — a cost read: nodes requested below —utilization (the autoscaler’s own 50% default) that carry a zero-disruption PDB, a controller-less pod, or a safe-to-evict=false pod; scanned counts nodes examined.
MCP tool: k8s_scaledown_blockers
lookout stab scaledown [flags]| Flag | Type | Default | Meaning |
|---|---|---|---|
--utilization | int | 50 | percent of allocatable (requests, max of CPU and memory; GPU alone on GPU nodes) below which a node counts as underused; default 50 is the cluster autoscaler’s own —scale-down-utilization-threshold, so match it if yours is tuned (1-100) |
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 |
|---|---|---|
scaledown.blocked | warning | the node is requested below —utilization, so the autoscaler would remove it, but a pod on it cannot be moved — a zero-disruption PDB, a pod with no controller, or a pod annotated safe-to-evict=false — so it keeps billing at low utilization |
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 |
|---|---|
utilization | the node’s requested share of allocatable on the deciding resource, whole percent, rounded down |
basis | the deciding resource: cpu or memory (whichever is higher), or gpu on a node that offers GPUs |
threshold | the —utilization the node was judged against, in percent |
nodepool | the node’s pool, from the provider’s pool label; omitted when the node carries none |
blockers | pods and PDBs pinning the node, counted |
pdb_gridlock | PodDisruptionBudgets allowing zero disruptions over a pod on the node; omitted at 0 |
bare_pods | pods with no controller and no safe-to-evict=true annotation; omitted at 0 |
not_safe_to_evict | pods annotated cluster-autoscaler.kubernetes.io/safe-to-evict=false; omitted at 0 |
blocked_by | the pinning objects as <Kind>/<namespace>/<name>, sorted, capped at 8 with a +N more tail |
nodes | summary note: nodes listed |
excluded | summary note: nodes the autoscaler never removes and so were not judged — control-plane, annotated scale-down-disabled, or already tainted for deletion |
underused | summary note: judged nodes below —utilization, blocked or not |
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 stab scaledownlookout stab scaledown --utilization=65lookout stab scaledown --format=json