GCP Core Services: GCE, GKE, Cloud Storage, BigQuery

Compare Google Cloud compute, storage, and analytics services by workload and configuration, then estimate costs with a scenario-based worksheet.

published: reading time: 29 min read author: Geek Workbench updated: November 17, 2026
Quick Summary

GCP's core services cover virtual machines, Kubernetes, serverless containers and event-driven functions, object storage, and analytics. Choose by workload, control needs, region, and recovery requirements. Estimate costs from billing mode, scaling, storage operations, and network use; Cloud Run settings and function generation affect behavior and price.

GCP Core Services: GCE, GKE, Cloud Storage, BigQuery

Introduction

Google Cloud Platform shares concepts with other cloud providers but uses its own service names and organizational model. The key difference is that GCP organizes everything around projects rather than accounts. A project groups related resources, carries its own IAM policies, and accumulates its own billing. This structure makes it easy to isolate workloads and control access per team. Everything lives in a project, and organizational policies cascade down through folders to all projects underneath.

For DevOps workloads, Google Cloud offers virtual machines through Compute Engine, managed instance groups, GKE Standard and Autopilot, Cloud Run services, Cloud Run functions, object storage, and managed databases. GKE Autopilot manages node provisioning, but billing can be Pod-based or node-based depending on the workload and selected hardware. Cloud Run scaling is also subject to service settings and regional quotas. Check those details before comparing costs or capacity.

These services tie together through Workload Identity, which lets Kubernetes service accounts act as GCP service accounts without managing key files. That is a meaningful improvement over storing service account keys in your codebase. The rest of this guide covers each service with practical examples, trade-off analysis, and production failure scenarios to help you avoid common mistakes. You will understand when to pick each compute option, how to configure GKE and Cloud Run for production, and what monitoring to set up.

When to Use

GKE Autopilot vs Standard

Choose GKE Autopilot when you want Google to manage node provisioning, scaling, and upgrades. General-purpose workloads are billed from Pod resource requests, while workloads that select specific hardware can use node-based billing plus a management premium. Compare resource requests and the current GKE pricing rules with your measured load before assuming Autopilot costs less than Standard.

Choose GKE Standard when you need SSH access to nodes, specific node configurations, daemon sets on dedicated infrastructure, or visibility into node-level resource allocation. Fixed, predictable workloads or compliance requirements around node access also point toward Standard.

The reason Autopilot removes node management is that Google provisions nodes on your behalf when pods schedule, then tears them down when workloads complete. Nodes are preemption-protected by default, so you do not manage upgrades or node lifecycle directly. This shifts the operational burden to Google but introduces constraints: Autopilot restricts instance types to predefined profiles, and you cannot run daemon sets on system nodes since the node pool is opaque.

Standard gives you the equivalent of EKS Managed Node Groups plus self-managed nodes in the same cluster. You can provision specific machine types, custom AMIs, or GPU nodes explicitly. This matters when you need particular kernel versions, GPU drivers, or security compliance that requires hardened images. Daemon sets run on nodes you designate as dedicated system nodes, which Autopilot does not support.

Factor Autopilot Standard
Node management Google manages You manage
Instance types Predefined profiles only Any Google Cloud machine type
SSH access No Yes
Daemon sets No Yes
Billing basis Pod resources for general workloads; node-based for selected hardware Node resources and selected services
Node allocation visibility Opaque Full
Upgrade management Automatic Manual or configured

Compute Engine vs Cloud Run vs Cloud Run functions

Compute Engine gives you control over a VM and its operating system. Cloud Run services run containers and handle HTTP requests. Cloud Run functions (formerly Cloud Functions) package function code for event-driven or HTTP use. First-generation Cloud Functions is a legacy product; runtime support and limits differ by generation.

Choose from the workload and operating requirements. For each option, check the service configuration, runtime, trigger, and target region before relying on a timeout, concurrency, scale, or availability limit. Cloud Run’s regional CPU and memory quotas affect how many instances can start, and the selected minimum instance count affects cost.

Cloud Run services support request-based or instance-based billing. Minimum instances, CPU allocation, request concurrency, timeout, and runtime choices affect both behavior and cost. Cold-start latency also depends on the image, runtime, initialization, network setup, region, and scaling state. Measure cold and warm requests under the traffic pattern you expect; a fixed startup-time range is not a reliable service objective. See Google’s billing settings, minimum instances, and Cloud Run functions overview.

Aspect Compute Engine Cloud Run service Cloud Run functions
Execution model VM and operating system Containerized service Function deployed as a managed service
Scaling Instance groups and autoscaling policy Autoscaling with regional quotas and configured min/max instances Trigger and generation dependent
Billing VM resources and attached services Request-based or instance-based setting Function generation and service configuration
Runtime and timeout Managed by the VM operator Container and service settings Supported runtime and generation
Startup behavior Boot and application startup Container startup when an instance is started Runtime and trigger startup path

Scenario cost worksheet

Estimate the same workload in the Google Cloud pricing calculator and confirm the rates for the chosen region before comparing services.

Scenario Inputs to collect Cost items to include
Sporadic HTTP API Requests per month, request duration, CPU/memory, concurrency, region, minimum instances Selected Cloud Run billing mode, idle minimum instances, network egress
Event-driven function Event rate, average and peak execution time, runtime, trigger, generation, region Cloud Run functions compute, scaling configuration, retries, data movement
Steady worker Required CPU/memory hours, disk, replica count, availability target, region VM or cluster resources, storage, load balancing, inter-zone/region traffic
Object storage GB-month by class, operation counts, retention, retrieval pattern, source/destination regions Storage, operations, retrieval, minimum-duration charges, and egress

Use measured traffic and an explicit time window. Record the region, configuration, and date with each estimate; published prices and quotas can change.

GCS Storage Class Selection

Choose a storage class from the expected access pattern and retention policy. The minimum storage duration is part of the cost model, but class labels alone do not tell you the total bill.

Class Common access pattern Minimum storage duration
Standard Data read often or with unpredictable access None
Nearline Data expected to be read about monthly or less often 30 days
Coldline Data expected to be read about quarterly or less often 90 days
Archive Data kept for long retention and rarely read 365 days

Retrieval and operation charges, location, redundancy choice, early deletion, and network egress can change which class costs less. Check the Cloud Storage class documentation and current Cloud Storage pricing for the bucket location and workload you plan to use.

Lifecycle policies can move or delete objects when conditions match. Treat a lifecycle rule as a data-retention policy: test the filter against representative object names, review the minimum storage duration and retrieval implications, and watch for rule propagation before using it to meet a deadline.

When Not to Use GCP

GCP works well for cloud-native workloads, but there are cases where it is the wrong call. These boundaries matter because choosing poorly means paying for complexity you do not need.

Avoid GKE Autopilot when you need specific kernel modules, custom node images, or daemon sets that require direct node access. Autopilot restricts SSH access and node-level customization. Teams with compliance requirements around host-based auditing or those running security agents that need node-level visibility should use GKE Standard or Compute Engine instead. Autopilot also restricts you to predefined instance profiles, so workloads with unusual CPU-to-memory ratios may not fit the available shapes.

Avoid Compute Engine when a VM would add management work without meeting a workload requirement. A Cloud Run service may cost less for some intermittent request workloads, but minimum instances, instance-based billing, CPU allocation, network use, and request patterns affect the estimate. Compare the same measured workload in the pricing calculator before deciding.

Choose bucket location from access and recovery requirements. Regional, dual-region, and multi-region buckets differ in placement, availability, pricing, and network behavior. Measure client latency from the regions that use the data, then include storage, operations, retrieval, and egress charges in the estimate.

Avoid BigQuery as a primary application database. BigQuery is an analytics warehouse, not a transactional database. It handles analytical queries over large datasets well but lacks the random-access read/write patterns that operational databases need. Application-layer joins, high-frequency updates, and sub-second query requirements are outside its design. Use Cloud SQL, Spanner, or Firestore for operational data, and keep BigQuery for the analytical layer.

There is also the familiarity factor. The gcloud CLI, Cloud Console, and IAM model differ from AWS or Azure. If your team is already deep in CloudFormation or SAM, the migration cost may not be worth it. GCP makes sense when you are building new infrastructure or can commit to its tooling from the start.

GCP Project and Resource Hierarchy

GCP resources follow a four-level hierarchy: Organization, Folder, Project, and Resource. The organization sits at the top, followed by folders that can contain other folders or projects, then individual resources within projects.

# Set your project
gcloud config set project my-project-123

# List available projects
gcloud projects list

# Set compute zone
gcloud config set compute/zone us-central1-a

# Set compute region
gcloud config set compute/region us-central1

Folders let you group projects by team, environment, or department. Organizational policies applied at the folder level cascade down to all contained projects. This simplifies governance for large organizations.

IAM roles control access at project or resource level. GCP distinguishes between primitive roles (owner, editor, viewer) that affect all resources, and predefined roles that grant specific permissions for specific services.

flowchart TD
    A[Organization] --> B[Folder: Team A]
    A --> C[Folder: Team B]
    B --> D[Project: prod-api]
    B --> E[Project: prod-frontend]
    C --> F[Project: dev-services]
    D --> G[GKE Autopilot Cluster]
    D --> H[Cloud Run Service]
    D --> I[Cloud Storage Bucket]
    E --> J[Cloud Run Service]
    F --> K[Compute Engine MIG]
    G --> L[Workload Identity]
    L --> M[GCP Service Account]

Compute Engine Fundamentals

Google Compute Engine (GCE) provides virtual machines similar to EC2. Instance templates define the machine type, image, disk, and network configuration for launching instances.

# Create an instance from a template
gcloud compute instances create web-server-1 \
  --source-instance-template=web-server-template \
  --zone=us-central1-a

# List running instances
gcloud compute instances list

# Connect via SSH
gcloud compute ssh web-server-1 --zone=us-central1-a

Managed instance groups (MIGs) maintain a fleet of instances across zones. Like AWS ASGs, MIGs automatically heal failed instances and scale based on load.

# Resize a managed instance group
gcloud compute instance-groups managed set-size web-server-mig \
  --size=5 \
  --zone=us-central1-a

# Update instance template for rolling updates
gcloud compute instance-groups managed rolling-action start-update web-server-mig \
  --zone=us-central1-a \
  --version=template=web-server-template-v2

Spot VMs can be reclaimed when Compute Engine needs the capacity, so use them only when the workload can tolerate interruption and restart. Their prices vary by machine type and location and can change; review current Spot VM pricing and preemption history for the target region before estimating savings.

GKE Operating Modes

Google Kubernetes Engine (GKE) offers two operating modes. Standard mode gives you control over node provisioning, scaling, and upgrades. Autopilot mode offloads node management to Google, provisioning and scaling nodes automatically as your workloads demand them.

# Create a Standard GKE cluster
gcloud container clusters create standard-cluster \
  --zone=us-central1-a \
  --num-nodes=3 \
  --machine-type=e2-medium

# Create an Autopilot GKE cluster
gcloud container clusters create autopilot-cluster \
  --region=us-central1 \
  --enable-autopilot

Autopilot clusters provision nodes when pods schedule and remove them when workloads complete. You pay per pod rather than per node, which can reduce costs for variable workloads. The tradeoff is less control over node configuration and the inability to SSH to nodes directly.

Standard clusters give you full control. You choose instance types, manage node pools explicitly, and handle upgrades yourself. This works better when you have specific infrastructure requirements or need to run daemon sets and system workloads on dedicated nodes.

# node-pool configuration for standard cluster
apiVersion: container.cnrm.cloud.google.com/v1beta1
kind: ContainerNodePool
metadata:
  name: compute-nodepool
spec:
  clusterRef:
    name: standard-cluster
  location: us-central1
  nodeConfig:
    machineType: e2-medium
    diskSizeGb: 50
  nodeCount: 3

GKE uses Kubernetes natively, so kubectl commands, Helm charts, and GitOps workflows work the same as any Kubernetes cluster. The main GCP-specific integrations are workload identity for service account authentication and Anthos for hybrid/multi-cluster management.

Cloud Storage for Artifacts

Google Cloud Storage (GCS) uses buckets to store objects. Buckets live in projects and have globally unique names. Storage classes differ in at-rest rates, retrieval charges, minimum duration, and availability by location; they do not require offline retrieval.

# Create a bucket
gcloud storage buckets create gs://my-artifacts-bucket \
  --location=US \
  --default-storage-class=STANDARD

# Upload artifacts
gcloud storage cp ./dist/app.tar.gz gs://my-artifacts-bucket/prod/

# List bucket contents
gcloud storage ls gs://my-artifacts-bucket/prod/

# Set lifecycle policy
gcloud storage buckets update gs://my-artifacts-bucket \
  --set-lifecycle-file=lifecycle-policy.json

Lifecycle policies automate object transitions between storage classes and deletions.

{
  "rule": [
    {
      "action": {
        "type": "SetStorageClass",
        "storageClass": "NEARLINE"
      },
      "condition": {
        "age": 30
      }
    },
    {
      "action": {
        "type": "Delete"
      },
      "condition": {
        "age": 365
      }
    }
  ]
}

GCS integrates with Cloud CDN for content delivery, with IAM for access control, and with Pub/Sub for triggering functions on object changes.

Cloud Run for Serverless Containers

Cloud Run runs containerized applications without managing infrastructure. Autoscaling behavior depends on the service’s minimum and maximum instance settings, concurrency, CPU and memory configuration, and regional quotas. Cloud Run supports private VPC connectivity through configured egress options; measure the chosen network path and region.

# Deploy a container to Cloud Run
gcloud run deploy webapp \
  --image=gcr.io/my-project/webapp:v1 \
  --platform=managed \
  --region=us-central1 \
  --allow-unauthenticated

# Check service status
gcloud run services describe webapp --region=us-central1

# View logs
gcloud run services logs read webapp --region=us-central1

Cloud Run cost depends on the service’s request-based or instance-based billing setting, allocated CPU, memory, minimum instances, and region. Compare those settings with your measured traffic in the billing documentation and pricing calculator; do not assume a fixed cost advantage over another provider.

# service.yaml for Cloud Run
apiVersion: serving.knative.dev/v1
kind: Service
metadata:
  name: webapp
spec:
  template:
    metadata:
      annotations:
        autoscaling.knative.dev/minScale: "0"
        autoscaling.knative.dev/maxScale: "100"
    spec:
      containers:
        - image: gcr.io/my-project/webapp:v1
          ports:
            - containerPort: 8080
          env:
            - name: NODE_ENV
              value: production
          resources:
            limits:
              cpu: 1000m
              memory: 512Mi

Cloud Run functions is Google’s current function deployment experience, following the earlier Cloud Functions product. Function generation, runtime, trigger, and service configuration affect supported behavior. Choose it when its function model fits the workload; choose a Cloud Run service when you need to own the container and HTTP service behavior.

GCP IAM for Service Accounts

IAM in GCP uses service accounts for workloads and human users. Service accounts are identities that workloads use to authenticate to GCP APIs. Workload Identity Federation lets Kubernetes service accounts assume GCP service accounts without managing key files.

# Create a service account
gcloud iam service-accounts create build-bot \
  --display-name="CI/CD Build Bot"

# Grant roles to the service account
gcloud projects add-iam-policy-binding my-project-123 \
  --member="serviceAccount:build-bot@my-project-123.iam.gserviceaccount.com" \
  --role="roles/storage.objectAdmin"

# Create a key for external use (CI/CD outside GCP)
gcloud iam service-accounts keys create key.json \
  --iam-account=build-bot@my-project-123.iam.gserviceaccount.com

Workload identity is the preferred approach for GKE workloads. It binds a Kubernetes service account to a GCP service account, and short-lived tokens replace key files.

# Enable workload identity on existing cluster
gcloud container clusters update standard-cluster \
  --region=us-central1 \
  --workload-pool=my-project-123.svc.id.goog

# Create IAM binding for the KSA
gcloud iam service-accounts add-iam-policy-binding \
  --role=roles/iam.workloadIdentityUser \
  --member="serviceAccount:my-project-123.svc.id.goog[default/my-k8s-service-account]" \
  my-gcp-sa@my-project-123.iam.gserviceaccount.com

For more on managing cloud costs across providers, see our post on Cost Optimization.

Trade-off Analysis

Workload need Candidate Check before choosing
VM-level control or specialized OS setup Compute Engine Image maintenance, autoscaling, availability, and idle capacity
Kubernetes APIs, operators, or cluster-level controls GKE Node mode, regional quotas, upgrades, and operational ownership
HTTP service deployed as a container Cloud Run service Request/instance billing, concurrency, timeout, min/max instances, and region
Event-triggered or function-shaped code Cloud Run functions Generation, trigger, supported runtime, retries, and region

Cloud Run functions and Cloud Run services share underlying platform concepts, but their deployment and trigger paths differ. Check the documentation for the exact product generation and region you use.

Production Failure Scenarios

Failure Impact Mitigation
GKE Autopilot pod scheduling failures due to quota Pods pending indefinitely, deployments time out Pre-check quota in the region, request quota increases via support
MIG instance health check failures Instances marked unhealthy and replaced, service disruption Verify firewall rules allow health check IPs, check instance startup scripts
Cloud Run startup latency affecting an SLO Cold instance startup contributes to request latency Measure by region and revision; evaluate minimum instances and startup configuration against cost
GCS bucket without lifecycle policy accumulating costs Storage costs grow unbounded for old artifact versions Apply lifecycle rules immediately on bucket creation, audit bucket sizes quarterly
Workload identity misconfiguration locking out GKE pods Pods cannot authenticate to GCP APIs, services fail Test workload identity bindings before deploying, keep a fallback key rotation window

GCP Observability Hooks

GCE and MIG monitoring:

# List MIG instances and their status
gcloud compute instance-groups managed describe web-server-mig \
  --zone=us-central1-a \
  --format="table(name,baseInstanceName,currentAction,status)"

# Get instance metrics via Cloud Monitoring
gcloud monitoring metrics list --filter="resource.type=gce_instance"

GKE monitoring:

# Get cluster component status
gcloud container clusters describe standard-cluster \
  --zone=us-central1-a \
  --format="table(name,status,currentMasterVersion)"

# Check pod status across namespaces
kubectl get pods -A -o wide

# Get node pool sizes
gcloud container node-pools list --cluster=standard-cluster --zone=us-central1-a

Cloud Run monitoring:

# Check service revisions and traffic
gcloud run services describe webapp --region=us-central1

# View recent logs
gcloud logging read "resource.type=cloud_run_revision" --limit=50

Key Cloud Monitoring signals to alert on:

Set alert thresholds from the service SLO, baseline, and capacity plan rather than copying a universal number. Break down charts by region and revision where the service supports those labels.

Service Signal Alert design
Compute Engine CPU, instance health, and availability Relate saturation and failed health checks to the VM service objective
GKE Pending pods, node pressure, and workload readiness Alert when scheduling delay or capacity threatens deployment or serving targets
Cloud Run Request latency, error rate, and instance count near configured maximum Use the service’s latency/error budget and configured capacity as limits
Cloud Storage Request errors, object growth, and estimated spend Alert on unexpected changes relative to the bucket’s access and retention plan

Common Anti-Patterns

Using the default network. GCP’s default network has permissive firewall rules and is the same across all projects. Create a dedicated network with explicit firewall rules for each environment.

Not using Workload Identity. Creating and managing service account key files is a security risk and an operational burden. Workload Identity eliminates key files entirely for GKE workloads.

Leaving service account keys in source code or CI/CD systems. Service account keys committed to git or stored in CI/CD variables are a common compromise vector. Use Workload Identity for GKE or short-lived credentials for CI/CD systems.

Not setting up GCS bucket policies. Buckets are private by default, but misconfigured uniform bucket-level access can accidentally expose data. Use IAM conditions and test bucket ACLs in a non-production environment first.

Mixing prod and non-prod resources in the same project. Using a single project for all environments defeats GCP’s natural isolation. Separate projects per environment make IAM governance simpler and contain blast radius.

Capacity planning

Use workload tests and current service limits to size capacity. Machine family names are a starting point, not a performance guarantee; machine type, processor, storage, network path, zone availability, and quotas affect the result.

GCE machine families

Family Starting use Check before deployment
E2 General-purpose workloads with cost constraints Available machine type and CPU/memory shape in the target zone
N series General-purpose application servers Processor generation, disk needs, and network limits
C series CPU-focused workloads Sustained CPU profile, memory ratio, and network limits
M series Memory-heavy workloads Memory capacity, processor generation, and regional availability
A or G series Accelerator workloads GPU model, quotas, drivers, and supported zones

Compare the exact type and zone in Google’s machine families guide and network bandwidth documentation, then benchmark with the application’s request mix.

Cloud SQL capacity

Cloud SQL connection limits depend on the database engine, instance configuration, memory, and database flags. Do not copy a fixed connection count from a tier table. Inspect the live database limit and set an application connection pool with backoff; Google’s quotas and limits and connection guidance describe the checks to use.

Benchmark the expected query mix and concurrency in the target configuration. Include storage latency, connection churn, failover behavior, and maintenance recovery in the test; a larger instance alone does not establish an application-level latency target.

Interview Questions

1. What is the difference between GKE Autopilot and GKE Standard mode, and when would you choose each?

What to cover:

  • Autopilot: Google manages node provisioning, scaling, and upgrades; billing depends on the workload's resource mode and selected hardware
  • Autopilot restricts SSH access and node-level customization; no daemon sets on dedicated nodes
  • Standard: you control nodes, instance types, node pools; full kubectl access
  • Choose Autopilot for: teams wanting Kubernetes without ops overhead, variable workloads
  • Choose Standard for: compliance needs node access, specific hardware, daemon sets
2. How does Workload Identity work in GKE and why is it preferred over service account keys?

What to cover:

  • Workload Identity binds a Kubernetes service account to a GCP service account
  • Pods get short-lived tokens via OIDC federation, no key files needed
  • Key advantages: no key file management, automatic rotation, audited access
  • Setup: enable Workload Identity on cluster, create IAM binding, annotate KSA
  • Security: compromised pod cannot steal static keys; tokens expire automatically
3. When would you use Cloud Run vs Cloud Run functions vs Compute Engine?

What to cover:

  • Compute Engine: persistent VMs, legacy workloads, specific hardware, stateful services
  • Cloud Run service: containerized HTTP workloads; review configured timeout, concurrency, minimum instances, and regional quotas
  • Cloud Run functions: function-shaped HTTP or event-driven workloads; check generation, runtime, trigger, and retry behavior
  • Choose by deployment model and control requirements; a function is not inherently faster or cheaper than a service
  • Cost and execution limits depend on billing mode, runtime, generation, scaling settings, and region; compare measured workloads
4. How do you choose the right GCS storage class for different access patterns?

What to cover:

  • Standard: hot data, accessed daily, immediate availability
  • Nearline: data read about monthly or less often; account for retrieval and early-deletion charges
  • Coldline: data read about quarterly or less often; compare storage cost with retrieval charges and minimum duration
  • Archive: data kept for long retention and rarely read; review retrieval fees, minimum duration, and current location pricing
  • Use lifecycle rules only after modeling access frequency, retrieval charges, minimum storage duration, and retention needs for each transition
5. How does GCP project hierarchy differ from AWS account hierarchy?

What to cover:

  • GCP: Organization → Folders → Projects → Resources (hierarchical)
  • AWS: Organization → Accounts → Regions → Resources (flat accounts, region-scoped)
  • GCP projects are the billing and authorization boundary; everything lives in a project
  • Organizational policies cascade down through folders to all projects
  • AWS SCPs work similarly but apply to accounts rather than projects
  • Both support cross-project/cross-account networking via VPC peering or shared VPCs
6. What are MIGs (Managed Instance Groups) and how do they handle high availability?

What to cover:

  • MIGs maintain desired instance count across zones automatically
  • Auto-healing: replaces failed instances based on health checks
  • Rolling updates: canary or rolling pattern for zero-downtime updates
  • Load balancing: MIGs integrate with Cloud Load Balancing for traffic distribution
  • Stateful MIGs for databases; regular MIGs for stateless web services
7. How do you set up Cloud Run for private workload access within a VPC?

What to cover:

  • Deploy Cloud Run with VPC connector: gcloud run services update --vpc-connector
  • VPC connector handles routing to private GCP resources (Cloud SQL, Memorystore)
  • Fully managed Cloud Run allows external traffic by default; disable with --no-allow-unauthenticated
  • Startup and connection behavior varies by network mode, NAT path, runtime, and region; measure the chosen configuration. See Direct VPC egress guidance
  • Alternative: use Cloud Run for Anthos for full VPC control
8. What is the GCP equivalent of AWS Lambda, and how does it compare?

What to cover:

  • Cloud Run functions: function deployment for supported runtimes and triggers; Cloud Run services: containerized services
  • Compare timeout, runtime, trigger, and scaling limits for the selected Cloud Run functions generation and region
  • Cloud Run service behavior depends on billing mode, minimum instances, CPU allocation, and service configuration
  • Billing units and rates differ by product, configuration, and region; use each provider's current pricing calculator
  • Concurrency and regional capacity depend on the deployed service settings, quotas, and provider limits
  • Key difference: Cloud Run is container-based, Lambda supports both container and zip
9. How do you configure lifecycle policies for GCS buckets?

What to cover:

  • Lifecycle rules defined in JSON: set_storage_class and delete actions
  • Conditions: age (days), created_before (date), is_live (boolean)
  • Example: age 30 → Nearline, age 90 → Coldline, age 365 → delete
  • Apply via: gcloud storage buckets update gs://bucket --set-lifecycle-file=policy.json
  • Test lifecycle rules in dev first; rules are async and may not apply immediately
10. What GCP monitoring tools would you use to alert on GKE pod scheduling failures?

What to cover:

  • Cloud Monitoring: metric policy for pod pending time > 2 minutes
  • Cloud Logging: filter for pods in Pending state for extended periods
  • Cloud Alerts: configure notification channels (email, SMS, PagerDuty)
  • Uptime checks: synthetic health checks for service availability
  • GKE Console: cluster component status shows control plane health
11. How do Cloud Load Balancing and Cloud Armor protect workloads?

What to cover:

  • DDoS protection depends on load balancer type and Cloud Armor configuration; review the coverage and pricing for standard and advanced network protection
  • Cloud Armor provides configurable application and network protections; coverage depends on policy type, load balancer, region, and subscription
  • Cloud Armor lets you create allow/deny rules based on IP, geolocation, or request attributes
  • Attach the appropriate Cloud Armor policy to the supported load-balancing or network edge resource; verify the product-specific deployment path
  • Use Cloud Armor for: WAF rules, rate limiting, geo-restrictions, bot protection
12. What is Cloud Build and how does it integrate with GKE for CI/CD?

What to cover:

  • Cloud Build is GCP's managed CI/CD service—serverless build infrastructure
  • Build triggers watch source repos (Cloud Source Repositories, GitHub, Bitbucket) for changes
  • Build steps run in containers—each step is a Docker container you control
  • For GKE deployments: build pushes image to GCR, then updates deployment in GKE
  • Cloud Build can run kubectl commands against GKE clusters via Workload Identity
13. How does Cloud Run compare to GKE for a stateless HTTP API in terms of operational overhead?

What to cover:

  • Cloud Run: managed container service; scaling depends on settings, quotas, and region
  • GKE: you manage the cluster (nodes, upgrades, autoscaling configuration)
  • Cloud Run simpler for stateless HTTP services—Containerize, deploy, done
  • GKE better for: non-HTTP workloads, stateful services, complex pod orchestration, service mesh
  • Startup latency depends on runtime and configuration; compare Cloud Run scale-to-zero behavior with the GKE capacity you keep available
  • Both scale horizontally; Cloud Run is simpler, GKE is more flexible
14. What are the trade-offs between regional and dual-region GCS buckets?

What to cover:

  • Regional: data is stored in one selected region; model client path, availability needs, and current regional pricing
  • Dual-region: data placement and redundancy are configured for two regions; verify recovery behavior and current charges
  • Do not assume clients are routed to the closest copy; measure the actual access path and application behavior
  • Choose a location strategy only after checking the service's availability behavior and the application's regional recovery plan
  • Consider: is your application architected to handle regional failure gracefully?
15. How does Secret Manager differ from env variables or Kubernetes Secrets for storing credentials?

What to cover:

  • Environment variables: baked into image or container at deploy time, visible in logs if leaked
  • K8s Secrets: base64 encoded (not encrypted by default), stored in etcd, require additional config for encryption at rest
  • Secret Manager: encrypted at rest with Google-managed or customer-managed keys, audit logged
  • Secret Manager integrates with Cloud Run, GKE, Cloud Run functions via Workload Identity—no key files
  • Secret Manager versioning: rotation creates new version, old version remains accessible
  • Secret Manager prevents accidental exposure in logs and provides access audit trails
16. What is the difference between Cloud SQL Proxy and direct Cloud SQL connections?

What to cover:

  • Direct connections require whitelisting IP addresses—problematic for dynamic Cloud Run/GKE IPs
  • Cloud SQL Proxy: establishes secure tunnel using IAM credentials, no IP whitelisting needed
  • Proxy handles TLS certificate rotation automatically
  • Cloud Run and GKE workloads use the proxy to connect without managing SSL certs or IPs
  • Proxy adds connection overhead (latency) but eliminates IP management complexity
17. How does GCP's organization hierarchy affect IAM policy inheritance?

What to cover:

  • Organization → Folders → Projects → Resources (top-down hierarchy)
  • IAM policies at higher levels cascade down to all contained resources
  • Folders inherit Organization policies; projects inherit Folder policies
  • Child-level policies can expand (grant more access) but not restrict (deny) parent grants
  • Use folders to group projects by team or environment—apply folder-level policies for team-wide access
18. What is the difference between Anthos and standard GKE for hybrid cloud scenarios?

What to cover:

  • Anthos is GCP's hybrid and multi-cloud Kubernetes platform—run K8s on-premises or other clouds
  • Standard GKE: GCP-managed control plane, nodes run on GCP infrastructure
  • Anthos: control plane can be managed by GCP while workloads run on your infrastructure (Anthos GKE on-prem)
  • Anthos includes Config Sync, Policy Controller, and Service Mesh (Anthos Service Mesh)
  • Use Anthos when: regulatory requirements prevent cloud migration, low-latency edge workloads, existing on-prem investment
19. How do you set up and use Cloud Scheduler for triggering Cloud Run functions or Cloud Run jobs?

What to cover:

  • Cloud Scheduler is a managed cron job service—runs jobs on a schedule with at-least-once delivery
  • Target types: HTTP endpoint (Cloud Run functions, Cloud Run, or any HTTP), Pub/Sub topic, App Engine app
  • Define schedule in cron format: `*/5 * * * *` (every 5 minutes), `0 9 * * *` (daily at 9am)
  • Retry configuration: failed jobs are retried with exponential backoff
  • Use for: periodic data processing, scheduled cleanup jobs, daily report generation
20. What is Cloud Memorystore and when would you use it versus managed database services?

What to cover:

  • Memorystore is GCP's managed Redis and Memcached service
  • Use for: session caching, real-time data caching, pub/sub messaging queues
  • Use databases (Cloud SQL, Spanner, Firestore) for persistent data that survives service restarts
  • Memorystore is not a database—it stores transient data that could be rebuilt from source of truth
  • Memorystore can be used for read-through caching: app reads from cache, falls back to DB if miss

Further Reading

Conclusion

Key Takeaways

  • GCP uses projects as the core organizational unit, not accounts like AWS
  • GKE Autopilot removes node management entirely—Google handles provisioning and scaling
  • GKE Standard keeps full control over nodes and is better for daemon sets and custom configurations
  • Cloud Run handles containerized HTTP services with true serverless scaling from zero
  • Workload Identity is the recommended way to give GKE workloads access to GCP APIs

GCP Onboarding Checklist

# 1. Set up a new project
gcloud projects create my-project-123 --name="My Project"

# 2. Enable required APIs
gcloud services enable container.googleapis.com compute.googleapis.com storage.googleapis.com

# 3. Create a GKE Autopilot cluster
gcloud container clusters create autopilot-cluster \
  --region=us-central1 \
  --enable-autopilot

# 4. Configure Workload Identity for a namespace
kubectl create serviceaccount my-sa -n default
gcloud iam service-accounts add-iam-policy-binding \
  --role=roles/iam.workloadIdentityUser \
  --member="serviceAccount:my-project-123.svc.id.goog[default/my-sa]" \
  my-gcp-sa@my-project-123.iam.gserviceaccount.com

# 5. Create a Cloud Storage bucket with lifecycle policy
gcloud storage buckets create gs://my-artifacts-bucket --location=US

Category

Related Posts

GCP Data Services: Dataflow, BigQuery, and Pub/Sub

Build Google Cloud data pipelines with Pub/Sub, Dataflow, BigQuery, and Cloud Storage; monitor lag and recover streaming data gaps.

#data-engineering #gcp #bigquery

Choosing a Git Team Workflow

Compare trunk-based development, short-lived feature branches, and release branches against your release, review, rollback, and compliance needs.

#git #version-control #branching-strategy

Git Flow: The Original Branching Strategy Explained

Master the Git Flow branching model with master, develop, feature, release, and hotfix branches. Learn when to use it, common pitfalls, and production best practices.

#git #version-control #branching-strategy