An engineering team is building an industrial IoT telemetry processing microservice that queries Cloud Bigtable. To validate data access patterns, they need an automated integration testing harness that executes on local developer workstations and CI runners without accessing live Google Cloud resources or needing GCP credentials. Which strategy correctly configures the microservice's client SDKs to interact with a locally started Bigtable emulator?
- Start the Bigtable emulator using the gcloud CLI and set the BIGTABLE_EMULATOR_HOST environment variable to the emulator's network address in the execution environment.Answer
- BProvision a dedicated single-node Google Kubernetes Engine (GKE) cluster in a development project to host Bigtable testing pods for local integration runs.
- CAssign the primitive Owner IAM role (roles/owner) to a local service account key file and pass its file path to the emulator startup command.
- DGrant the Service Account Admin role (roles/iam.serviceAccountAdmin) to test runners so they can generate temporary service account keys to connect to live Bigtable instances during test execution.
Answer
Start the Bigtable emulator using the gcloud CLI and set the BIGTABLE_EMULATOR_HOST environment variable to the emulator's network address in the execution environment.
Starting the emulator via the gcloud CLI and exporting the BIGTABLE_EMULATOR_HOST environment variable causes official Google Cloud SDKs to intercept requests and send them to the local emulator, eliminating the need for cloud network access or GCP IAM credentials.
Step-by-Step Solution
Key Concept
Cloud Bigtable Emulator Configuration