Flashcardsfor IT Certifications

D1: Building & Refactoring Containers for Cloud Run & GKE

Google Cloud Professional Cloud Developer exam practice questions · 10 flashcards

Question
Container best practices?
1 / 10

Tip: Space flips the card, ← / → navigate.

Last updated: · Report an error on this page

Show all 10 Building & Refactoring Containers for Cloud Run & GKE practice questions and answers
  1. Container best practices?
    Small base images, multi-stage builds, one process per container, non-root user.
  2. What port must a Cloud Run container listen on?
    The port in the PORT environment variable (default 8080).
  3. Why should Cloud Run services be stateless?
    Instances are created and destroyed automatically; state must live in external stores.
  4. What are buildpacks?
    Build container images from source without a Dockerfile.
  5. What are multi-stage builds?
    Build in one stage, copy only artifacts to a slim runtime image.
  6. How should apps handle config?
    Environment variables and Secret Manager, not baked into images.
  7. Refactoring a monolith for containers?
    Externalize state, split into services, use managed backing services.
  8. Why handle SIGTERM?
    Gracefully finish requests before the container stops.
  9. Where should logs go from containers?
    stdout/stderr (structured JSON) for Cloud Logging.
  10. Why pin image versions/digests?
    Reproducible, secure deployments.