Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Developer practice bank has an additional 608 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
A development team is building a containerized microservice in VS Code that will be deployed to both Cloud Run and Google Kubernetes Engine (GKE). They want to optimize their local inner-loop workflow with the following requirements:
Which development workflow should the team implement?
Cloud Code is an IDE extension for VS Code, JetBrains IDEs, and Cloud Shell Editor that brings Cloud Run, Google Kubernetes Engine (GKE), and core Google Cloud developer services directly into the editor. By unifying local container tooling, authentication, and observability inside a single workspace, it eliminates constant context switching between the terminal, browser console, and editor.
launch.json and Skaffold run configurations), any saved code change triggers an automatic container rebuild and redeployment.Unlike CLI-only workflows or remote CI/CD loops, Cloud Code delivers sub-minute inner-loop feedback inside the IDE while covering both Cloud Run and Kubernetes targets, centralized log streaming, and Secret Manager integration in one cohesive workflow.
gcloud beta code dev command with a service.dev.yaml manifest and the --service-account flag, tail output with docker logs -f, and pass API keys as environment variables in the YAML configuration.The gcloud beta code dev command provides a CLI-based local development environment for Cloud Run. It builds container images from a Dockerfile or Google Cloud buildpacks, runs the container locally, watches for source code edits to trigger rebuilds, and reads service configuration overrides from a service.dev.yaml file.
--service-account flag downloads and caches a service account key on the developer's local machine, introducing a credential management risk that violates the requirement to avoid local key files.service.dev.yaml risks exposing sensitive data in configuration files, while running docker logs -f forces developers out of an integrated IDE Log Viewer.K_REVISION prefixes starting with dev- when running locally.The team wanted a lightweight, command-line-only workflow exclusively for Cloud Run local testing using --application-default-credential instead of --service-account keys, and did not need IDE log streaming, GKE emulation, or Secret Manager integration.
docker run, bind-mount a downloaded service account JSON key using GOOGLE_APPLICATION_CREDENTIALS, view container output via the Docker CLI, and load API keys from an untracked .env file.Running a container directly with docker run lets developers test a packaged image locally on a chosen port (-p and -e PORT=8080) while injecting a downloaded service account JSON key via a read-only volume mount (-v) and the GOOGLE_APPLICATION_CREDENTIALS environment variable.
docker run does not watch source files for changes or automatically rebuild and re-run containers; it also lacks Cloud Run service emulation (such as Cloud SQL connection proxies) and Kubernetes orchestration..env files require manual distribution across developers rather than centralized Secret Manager governance, and inspecting output through the Docker CLI lacks IDE-integrated log streaming.K_SERVICE or K_REVISION unless manually specified.The developer needed a quick, one-off verification of a pre-built container image in an environment without Cloud Code or minikube, and had an approved exception to use a local service account key.
Cloud Build is a managed continuous integration and continuous delivery (CI/CD) service that automates building container images, pushing them to Artifact Registry, and deploying new revisions to remote Cloud Run services or GKE clusters whenever commits are pushed to a repository.
The team was designing an outer-loop CI/CD pipeline to validate merged pull requests, enforce automated build checks, and promote tested container images across staging and production environments.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated