Skip to content

lookout audit computeclass

GKE ComputeClass, hardware-placement, and node-pool zone posture: workloads referencing a non-existent ComputeClass (ComputeClassMissing), workloads requesting a compute class or accelerator that matches zero nodes without node-pool auto-creation (ComputeClassNoMatchingNodes), multi-replica workloads pinned directly to Spot nodes without a ComputeClass fallback chain (SpotWithoutFallback), accelerator workloads pinned to a zone that hosts no matching accelerator nodes while other zones do (UnsatisfiableZoneWithAccelerator), and multi-node pools confined to a single availability zone (SingleZoneNodePool). Scope with —namespace, -A, or —workload.

MCP tool: k8s_audit_computeclass (MCP profile: audit)

Terminal window
lookout audit computeclass [flags]
FlagTypeDefaultMeaning
--skip-system-namespacesbool—skip system namespaces matching the active posture policy’s system_namespaces patterns
--policystring—path to a YAML posture policy file
--profilestring—built-in posture profile: default|strict|onboarding|gke-autopilot
--onlystring—comma-separated check kind or kind/reason globs to run exclusively
--skipstring—comma-separated check kind or kind/reason globs to skip
--min-severitystring—minimum finding severity to emit: info|warning|critical
--setstring—comma-separated check parameter overrides (<kind>.<param>=<val>)
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
audit.compute_class_posturewarning, infoa workload’s GKE ComputeClass or hardware-placement spec has no fallback or cannot be satisfied by the cluster: references a non-existent ComputeClass, requests a class or accelerator with zero matching nodes and no node-pool auto-creation, pins multi-replica pods directly to Spot without a ComputeClass priority fallback chain, or pins an accelerator workload to a zone with zero matching accelerator nodes while other zones have them
audit.single_zone_nodepoolwarning, infoa multi-node pool has all of its nodes in a single availability zone while the cluster spans multiple zones, or a workload with zone topologySpreadConstraints is pinned to a single-zone node pool
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
compute_classthe cloud.google.com/compute-class name requested by the workload template
acceleratorthe accelerator type (cloud.google.com/gke-accelerator) or extended resource (nvidia.com/gpu, google.com/tpu) requested by the workload template
zonethe availability zone (topology.kubernetes.io/zone) the workload or single-zone node pool is pinned to
accelerator_zoneszones in the cluster that actually host nodes with the requested accelerator, capped at 8
replicasthe workload’s desired replica count (spec.replicas)
spot_selectorthe nodeSelector or affinity expression pinning the workload directly to Spot nodes
servicescount of serving Services routing to the workload, when Service-backed
service_namesnames of the serving Services routing to the workload, capped at 8
nodepoolthe cloud.google.com/gke-nodepool name for a single-zone node pool
nodeson a single-zone nodepool finding, the number of nodes in that pool; as a summary note, the total nodes in the cluster
cluster_zonesdistinct availability zones across all nodes in the cluster, capped at 8
affected_workloadsworkloads with zone topologySpreadConstraints pinned to the single-zone node pool
affected_workload_namestheir Kind/namespace/name, sorted and capped at 8
compute_classessummary note: ComputeClass custom resources listed in the cluster, when the CRD is served
skipped_system_namespacessummary note: distinct system namespaces skipped under --skip-system-namespaces
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 audit computeclass -A
lookout audit computeclass --namespace=prod
lookout audit computeclass --workload=Deployment/prod/inference