LocalCloud GKE Local Emulator
Get started
local.cloud — GKE Local Emulator .md Open tab

GKE

Google Kubernetes Engine manages Kubernetes clusters for container workloads. LocalCloud uses k3d to provide a local Kubernetes runtime alongside supported cluster metadata.

When to use GKE

Typical uses

Use when deployment depends on Kubernetes manifests and APIs, and you need cluster provisioning plus pod readiness checks. Local tests require Docker and k3d.

Examples

  • Kubernetes deployment tests
  • Cluster provisioning and readiness checks
Compute & Runtime

GKE is opt-in to save memory. Add gke to the services you start, for example localcloud start --local-only --services gke,gcs,pubsub; --services sets the exact list.

Explore another service

View all
Local workflow

Example usage

Install the CLI, start LocalCloud, and export its environment in the same shell. Generated endpoints account for remapped ports.

1. Install and start · shell
curl -fsSL https://local.cloud/install.sh | sh
localcloud start --local-only --services gke
# Export GOOGLE_CLOUD_PROJECT and GKE_EMULATOR_HOST
eval "$(localcloud env)"

Deploy to a local Kubernetes cluster

  1. Create a supported cluster with Docker and k3d available.
  2. Connect kubectl using the local cluster configuration.
  3. Deploy a test workload and check that its pods become ready.

Documented workflows

  • Cluster metadata lifecycle
  • Real local Kubernetes clusters through k3d
  • Pod ADC through annotated Kubernetes-to-Google service-account bindings

Service boundaries

  • Requires k3d and Docker
  • No node-pool creation, autoscaling, resize, or upgrades
  • GKE REST cluster calls require AlloyDB disabled; gRPC is separate
  • Pod identity requires the service-account annotation and workloadIdentityUser grant; direct principal federation is unsupported
Try it in your project

Code examples and integrations

Start with the local guides. Official Google Cloud samples may need endpoint changes and can cover features outside the workflows listed here.

Agent testing

Use GKE with an AI agent

Before the agent changes application logic, have it create local GKE state, read it back with the project SDK, and note which feature the check covered. That first local call catches accidental production routing and needs no GCP account, service-account key, or billing project.

Configure this repo

Set up this repository to use LocalCloud for local GCP development. First read https://local.cloud/ai/agents.md, then inspect this repo, identify the GCP services and SDK language, configure emulator environment variables, and run the narrowest integration test against localhost. Do not use real GCP credentials or production endpoints.

Production endpoints, auth, IAM, quotas, regional behavior, and final release validation still need the target Google Cloud project.

Agent resources has more prompts and the AGENTS.md template.

Related guides

Desktop view