Sample Questions and Answers
What is an effective way to monitor the usage and errors of your Cloud Functions?
A) Use Cloud Logging and Cloud Monitoring dashboards
B) Only check logs manually on local machines
C) Use Cloud Storage for logs
D) No monitoring is needed
Answer: A) Use Cloud Logging and Cloud Monitoring dashboards
Explanation: Cloud Logging captures detailed logs and Cloud Monitoring helps visualize and alert.
Which tool allows you to analyze and optimize your Google Cloud costs?
A) Google Cloud Cost Management tools, including Cost Explorer and Budgets
B) Cloud Logging
C) Cloud Functions
D) Cloud Build
Answer: A) Google Cloud Cost Management tools, including Cost Explorer and Budgets
Explanation: These tools help track and control cloud spending.
Which is a recommended practice for application error handling in Google Cloud?
A) Use retries with exponential backoff and circuit breakers to handle transient errors
B) Ignore errors and let applications fail
C) Always retry instantly without limits
D) Hardcode error messages only
Answer: A) Use retries with exponential backoff and circuit breakers to handle transient errors
Explanation: These patterns improve resilience and prevent cascading failures.
What is Cloud Run’s concurrency feature?
A) It allows multiple requests to be handled simultaneously by a single container instance
B) It processes only one request at a time
C) It disables auto-scaling
D) It limits requests to only one per minute
Answer: A) It allows multiple requests to be handled simultaneously by a single container instance
Explanation: Concurrency improves resource utilization and throughput.
How does Secret Manager help with DevOps pipelines?
A) It securely stores secrets and allows controlled access in automated workflows
B) It replaces source code repositories
C) It stores container images
D) It runs automated tests
Answer: A) It securely stores secrets and allows controlled access in automated workflows
Explanation: Secrets can be dynamically accessed during build or deploy.
Which Google Cloud service is designed for building APIs with fully managed gateways?
A) API Gateway
B) Cloud Functions
C) App Engine Standard
D) Cloud Storage
Answer: A) API Gateway
Explanation: API Gateway secures and manages API endpoints at scale.
How can you reduce cold start latency in Cloud Functions?
A) Keep functions warm by periodically triggering them or using minimum instances (in Cloud Run)
B) Use larger VM sizes
C) Use synchronous HTTP calls only
D) Deploy multiple functions per project
Answer: A) Keep functions warm by periodically triggering them or using minimum instances (in Cloud Run)
Explanation: Warm functions respond faster, reducing cold start delays.
What is the purpose of the IAM role “roles/cloudfunctions.invoker”?
A) Allows a user or service account to invoke (call) Cloud Functions
B) Allows deployment of Cloud Functions
C) Allows access to Cloud Storage
D) Grants billing permissions
Answer: A) Allows a user or service account to invoke (call) Cloud Functions
Explanation: This role controls who can trigger functions.
Which Google Cloud service provides event-driven serverless computing?
A) Cloud Functions
B) Compute Engine
C) Cloud SQL
D) Cloud Storage
Answer: A) Cloud Functions
Explanation: Cloud Functions run code in response to events without managing infrastructure.
What is the difference between Cloud Run and App Engine Standard?
A) Cloud Run runs any stateless container, App Engine Standard runs apps in supported runtimes
B) App Engine Standard only runs containers, Cloud Run only runs code
C) Both are identical
D) Cloud Run does not scale automatically
Answer: A) Cloud Run runs any stateless container, App Engine Standard runs apps in supported runtimes
Explanation: Cloud Run offers more flexibility with container runtimes.
How do you control access to a Cloud Storage bucket?
A) Use IAM policies and bucket-level ACLs
B) Share public URLs only
C) Use local file permissions
D) Use Cloud DNS policies
Answer: A) Use IAM policies and bucket-level ACLs
Explanation: IAM policies define who can access buckets and objects securely.
What is Cloud Profiler best used for?
A) Continuously profiling applications in production to find performance bottlenecks
B) Managing Cloud SQL backups
C) Scheduling jobs
D) Deploying containers
Answer: A) Continuously profiling applications in production to find performance bottlenecks
Explanation: It helps optimize CPU and memory usage in running apps.
How does Google Cloud’s Anthos help developers?
A) Enables hybrid and multi-cloud deployments with consistent Kubernetes management
B) Is only for storage management
C) Runs only on-premises without cloud integration
D) Manages billing accounts
Answer: A) Enables hybrid and multi-cloud deployments with consistent Kubernetes management
Explanation: Anthos provides a unified platform for container orchestration.
Which service would you use to analyze logs in Google Cloud?
A) Cloud Logging with Logs Explorer
B) Cloud SQL
C) Cloud Storage
D) Cloud Functions
Answer: A) Cloud Logging with Logs Explorer
Explanation: Logs Explorer helps query and analyze logs from multiple services.
How do you roll back a deployment in Cloud Run?
A) Redirect traffic back to a previous revision
B) Delete the service and redeploy
C) Stop the Cloud Run service
D) Use Cloud Storage
Answer: A) Redirect traffic back to a previous revision
Explanation: Traffic splitting allows easy rollbacks without downtime.
What is the best practice to deploy a microservices architecture on Google Cloud?
A) Use Kubernetes Engine (GKE) to manage containerized microservices
B) Deploy all microservices in a single monolithic App Engine app
C) Use Cloud Functions exclusively for all microservices
D) Store microservices in Cloud Storage
Answer: A) Use Kubernetes Engine (GKE) to manage containerized microservices
Explanation: GKE provides orchestration and management of containerized microservices, supporting scaling and updates.
How does Cloud Pub/Sub ensure message delivery?
A) At least once delivery with message acknowledgment and retry mechanisms
B) Exactly once delivery with no retries
C) Best effort with no guarantee of delivery
D) Delivery only once with no acknowledgment
Answer: A) At least once delivery with message acknowledgment and retry mechanisms
Explanation: Pub/Sub guarantees at least one delivery; duplicates can happen and must be handled by the subscriber.
What is the primary use of Cloud Endpoints?
A) To expose, secure, and monitor APIs
B) To store large files
C) To run serverless functions
D) To schedule batch jobs
Answer: A) To expose, secure, and monitor APIs
Explanation: Cloud Endpoints provides API gateway capabilities including authentication, logging, and monitoring.
Which environment variables management strategy is recommended for Google Cloud applications?
A) Store environment variables securely in Secret Manager and inject at runtime
B) Hardcode environment variables into source code
C) Store environment variables in Cloud Storage publicly
D) Use environment variables only in local development
Answer: A) Store environment variables securely in Secret Manager and inject at runtime
Explanation: This approach avoids exposing sensitive data and centralizes management.
What is the advantage of using Cloud Build triggers?
A) Automatically start build pipelines on code changes in repositories
B) Manually start builds only
C) Only supports manual triggers from the console
D) Cannot integrate with version control systems
Answer: A) Automatically start build pipelines on code changes in repositories
Explanation: Triggers enable continuous integration by automating builds on commits or PRs.
When should you use Cloud Memorystore in an application?
A) For low-latency, in-memory caching of frequently accessed data
B) For persistent storage of large files
C) To run batch jobs
D) For hosting containerized apps
Answer: A) For low-latency, in-memory caching of frequently accessed data
Explanation: Memorystore supports Redis or Memcached caching for performance improvement.
What is the key benefit of using Cloud Tasks in a microservices architecture?
A) Decouples services by handling asynchronous work and retries reliably
B) Runs synchronous HTTP calls only
C) Is used for storing large datasets
D) Manages billing reports
Answer: A) Decouples services by handling asynchronous work and retries reliably
Explanation: Cloud Tasks enables reliable task queues and smoothens service dependencies.
How can you improve the security posture of your container images?
A) Use Container Analysis for vulnerability scanning and enforce image signing
B) Use unverified public images without scanning
C) Store images in public Cloud Storage buckets
D) Disable image scanning to speed up deployment
Answer: A) Use Container Analysis for vulnerability scanning and enforce image signing
Explanation: Scanning helps detect vulnerabilities; image signing ensures integrity.
How does Google Cloud’s Identity-Aware Proxy (IAP) help protect applications?
A) Controls user access to web applications and VMs by verifying identity and context
B) Only protects Cloud Storage buckets
C) Replaces firewall rules entirely
D) Is used to schedule cron jobs
Answer: A) Controls user access to web applications and VMs by verifying identity and context
Explanation: IAP provides secure access controls integrated with IAM.
Which is the best practice for handling configuration changes in a multi-environment setup?
A) Use separate configurations per environment and manage them with Cloud Build or Config Connector
B) Use a single configuration for all environments
C) Hardcode configuration values in application code
D) Store configuration only locally
Answer: A) Use separate configurations per environment and manage them with Cloud Build or Config Connector
Explanation: Environment-specific configs reduce errors and allow safer deployments.
What is the main difference between Google Cloud Functions and Cloud Run?
A) Cloud Functions runs event-driven functions; Cloud Run runs any stateless container
B) Cloud Run only supports HTTP triggers; Functions supports events
C) Cloud Functions supports containers; Cloud Run does not
D) Both are identical
Answer: A) Cloud Functions runs event-driven functions; Cloud Run runs any stateless container
Explanation: Cloud Run provides more flexibility with containers, Cloud Functions focuses on event triggers.
Which Google Cloud service allows you to define and enforce organization-wide policies?
A) Organization Policy Service
B) Cloud IAM
C) Cloud Logging
D) Cloud Scheduler
Answer: A) Organization Policy Service
Explanation: It helps define constraints and guardrails across Google Cloud resources.
What does Cloud Monitoring use to collect metrics from your application?
A) Metrics exporters or agents running on the environment
B) Only manual input
C) Cloud Storage logs
D) Cloud DNS
Answer: A) Metrics exporters or agents running on the environment
Explanation: These agents collect telemetry data for monitoring and alerting.
Which service should be used to securely manage OAuth2 client secrets for your application?
A) Secret Manager
B) Cloud Storage
C) Cloud SQL
D) Cloud Pub/Sub
Answer: A) Secret Manager
Explanation: Secret Manager provides secure, versioned storage and access controls for sensitive data.
What is the primary benefit of using Cloud Scheduler?
A) Running scheduled jobs or triggering events at specified times
B) Running batch processing jobs on demand only
C) Storing large files
D) Managing container images
Answer: A) Running scheduled jobs or triggering events at specified times
Explanation: Cloud Scheduler enables cron-like job scheduling in Google Cloud.
How do you ensure reliable delivery of messages when using Cloud Pub/Sub?
A) Use acknowledgments and implement retry logic on the subscriber side
B) Rely on best-effort delivery only
C) Deliver messages without acknowledgment
D) Use Cloud Storage instead of Pub/Sub
Answer: A) Use acknowledgments and implement retry logic on the subscriber side
Explanation: Pub/Sub requires message acknowledgment to confirm receipt and trigger retries.
What is the purpose of the Cloud Build cloudbuild.yaml file?
A) Defines build steps, their order, and configuration for a build pipeline
B) Defines application deployment configurations
C) Stores environment variables
D) Schedules build triggers
Answer: A) Defines build steps, their order, and configuration for a build pipeline
Explanation: cloudbuild.yaml configures build automation.
How does Cloud Run handle scaling?
A) Automatically scales container instances based on incoming request traffic
B) Requires manual scaling configurations
C) Scales only once per day
D) Does not scale automatically
Answer: A) Automatically scales container instances based on incoming request traffic
Explanation: Cloud Run is serverless and scales dynamically.
What is a best practice when designing APIs for your cloud applications?
A) Use RESTful principles with proper HTTP verbs and status codes
B) Use only GET requests for all operations
C) Avoid versioning APIs
D) Use SOAP only
Answer: A) Use RESTful principles with proper HTTP verbs and status codes
Explanation: REST APIs are standard for cloud apps; versioning helps maintain backward compatibility.
Which Google Cloud product provides a managed environment for hosting containerized applications?
A) Google Kubernetes Engine (GKE)
B) Cloud Functions
C) Cloud Storage
D) Cloud Spanner
Answer: A) Google Kubernetes Engine (GKE)
Explanation: GKE manages Kubernetes clusters for container orchestration.
How do you secure data at rest in Google Cloud Storage?
A) Use Google-managed encryption keys or customer-managed keys (CMEK)
B) Store data without encryption
C) Use HTTP instead of HTTPS
D) Store secrets in Cloud Storage
Answer: A) Use Google-managed encryption keys or customer-managed keys (CMEK)
Explanation: Cloud Storage encrypts data at rest by default; CMEK offers additional control.
What is the benefit of using Google Cloud’s VPC Service Controls?
A) To protect services and data by creating security perimeters around resources
B) To manage billing accounts
C) To schedule tasks
D) To monitor application performance
Answer: A) To protect services and data by creating security perimeters around resources
Explanation: VPC Service Controls help prevent data exfiltration from Google Cloud services.
What tool allows developers to simulate production traffic and test applications?
A) Cloud Load Testing tools such as open-source frameworks or third-party services integrated with Cloud
B) Cloud Storage
C) Cloud Scheduler
D) Cloud Pub/Sub
Answer: A) Cloud Load Testing tools such as open-source frameworks or third-party services integrated with Cloud
Explanation: Load testing simulates traffic to assess performance and scalability.
What is the advantage of using Cloud Source Repositories?
A) Fully-managed private Git repositories integrated with Google Cloud services
B) Only public repositories for open-source projects
C) Store large binary files
D) Replace Cloud Build
Answer: A) Fully-managed private Git repositories integrated with Google Cloud services
Explanation: It offers Git hosting and integration for CI/CD.
How can you automate environment provisioning and application deployment on Google Cloud?
A) Use Infrastructure as Code tools like Terraform or Deployment Manager combined with CI/CD pipelines
B) Manually create resources and deploy applications
C) Use only Cloud Console UI
D) Use Cloud Storage buckets
Answer: A) Use Infrastructure as Code tools like Terraform or Deployment Manager combined with CI/CD pipelines
Explanation: Automation improves repeatability and reduces errors.
Which service provides managed PostgreSQL and MySQL databases on Google Cloud?
A) Cloud SQL
B) Cloud Spanner
C) Firestore
D) Bigtable
Answer: A) Cloud SQL
Explanation: Cloud SQL offers managed relational databases with high availability.
What is a benefit of using Cloud Logging with sinks?
A) Route logs to external destinations such as BigQuery or Cloud Storage for analysis or archival
B) Delete logs automatically without storage
C) Disable logs completely
D) Store logs only locally
Answer: A) Route logs to external destinations such as BigQuery or Cloud Storage for analysis or archival
Explanation: Sinks help export logs for long-term storage or detailed analysis.
Reviews
There are no reviews yet.