Part 4: Compute Inventory: VMs, Serverless, and GKE at a Glance

AuthorEmmanuel Secretaria

Published Aug 11, 2025

Survey GCE, App Engine, Functions, Cloud Run, and GKE to understand your runtime footprint and operational hotspots.

Share

Scope inspiration:

gcp_info_compute.sh, gcp_info_gke.sh, kubernetes/kubernetes_info.sh.

This series follows the repo’s GCP inventory flow so every step builds a repeatable, audit-friendly picture of your environment. Part 4 maps compute and runtime services so you know where workloads actually run.


What this script does (walkthrough)

The compute inventory is intentionally ordered from foundational VMs through higher-level runtimes and finally into Kubernetes cluster introspection.

  1. List GCE instances with zones sorted to surface placement.
  2. Describe App Engine and list instances when App Engine exists.
  3. Enumerate Cloud Functions and Cloud Run services when their APIs are enabled.
  4. List GKE clusters and then enumerate Kubernetes resources per cluster via
    kubernetes_info.sh
    .

Operational caveats and gotchas

  • The compute script is non-interactive friendly, but Kubernetes sections can hang if you are not on a network that can reach cluster control planes.
  • App Engine discovery is forgiving — it will return cleanly if App Engine hasn’t been created.
  • GKE discovery calls
    gcloud container clusters get-credentials
    for each cluster; expect context changes and extra auth prompts if your account isn’t ready.

Example command usage

# Full compute inventory
# (this includes GKE + Kubernetes resource listings)
gcp/gcp_info_compute.sh
# Only GKE inventory (clusters + k8s resources)
gcp/gcp_info_gke.sh