Community Q&A

PCDOE — frequently asked questions

Community-vetted answers to 55 common questions about this exam, each traced back to a specific practice question.

Questions from real practice questions

Each Q&A comes from a specific question — follow the link for the full analysis

Collecting Custom Logs from Unmodifiable GKE Pods

Why not use a sidecar container for logging?

Sidecars add complexity and require shared volumes. Fluentd DaemonSets are the native, scalable way to collect custom logs in GKE without touching the app container.

Can the default Stackdriver agent read custom files?

No, the default agent only captures stdout/stderr and predefined system logs. You must customize the Fluentd configuration to tail new file paths.

Granting Log Export Permissions in Google Cloud

Why isn't a custom role with logging.sinks.create sufficient?

While logging.sinks.create is needed, the configWriter role includes it plus other necessary permissions for managing sinks and metrics, making it the complete solution.

Can I use logging.viewer role to export logs?

No, logging.viewer only allows reading logs. Exporting requires creating sinks, which needs configWriter permissions.

Optimizing SLO Balance Between Reliability and Velocity

Why not tighten the SLO if the service is doing well?

Tightening the SLO (Option A) increases the cost of reliability without clear business benefit. The SRE framework suggests using stability to enable speed elsewhere.

What does the SLO Decision Matrix recommend for stable services?

It recommends treating reliability as a solved problem, allowing teams to increase release frequency or reduce reliability efforts to help other struggling services.

Centralizing Production Folder Logs with an Aggregated Log Sink

Does a folder-level aggregated log sink collect logs from projects below that folder?

Yes. An aggregated sink created on the production folder includes log entries from the folder itself and from all child folders and projects, so you do not need a sink per project.

Why not route the production-folder logs to Pub/Sub for near-real-time analysis?

Pub/Sub is a streaming transport, not a log analysis store. It is appropriate when a named subscriber such as a SIEM or Cloud Function consumes the stream; without one, a Cloud Logging bucket provides the native query and alerting path.

Is the hourly routing delay for Cloud Storage relevant to a Cloud Logging bucket destination?

No. The hourly processing warning applies to Cloud Storage buckets used for archival. Log entries routed to Cloud Logging buckets are available for querying and analysis without that archival delay.

Cloud Run Traffic Splitting and Tagged Revisions for Testing

Why not use traffic splitting for testing?

Traffic splitting sends real user requests to the new version. If you need to test extensively without impacting users, you must isolate the new version completely using tags.

Is Green/Blue better than Tags?

Green/Blue involves managing two separate environments/services. Cloud Run Tags allow you to test different versions within the same service, which is more efficient for staged rollouts.

Configuring Cloud Logging for API IP Addresses in GCP

Why is VPC Flow Logs insufficient for logging each IP address?

VPC Flow Logs use a primary sampling rate that varies based on load, meaning some packets are dropped. This sampling prevents guaranteed logging of every single IP address.

Does enabling firewall logging impact performance significantly?

While firewall logging adds minimal overhead, it is the only native method listed that guarantees logging of every matching packet without requiring agents or complex mirroring setups.

SRE Postmortem Triggers: External Stakeholders and Data Loss

Why is data loss always a postmortem trigger?

Data loss is a critical failure that compromises user trust and system integrity. It requires thorough investigation to understand the root cause and implement safeguards to prevent recurrence.

Does every instance failure require a postmortem?

No. If instances fail and are automatically replaced by auto-healing systems without user-visible impact, it is considered routine operation. Postmortems are reserved for events with significant user impact or data loss.

Sharing Cloud Monitoring Dashboards with External Partners

Can I share a Cloud Monitoring dashboard directly with another project?

You can share visibility by granting IAM roles (e.g., Viewer) on the dashboard resource, but this grants access to all other resources in the project too. For external partners, this is often insecure.

What is the difference between sharing a dashboard URL and exporting JSON?

Sharing a URL allows viewing/copying if you have permissions. Exporting JSON allows importing the dashboard configuration into another project without exposing the source project's data or resources.

Automating Integration Tests with Cloud Build and GitHub

Why is option C wrong if it uses Cloud Build?

Option C triggers tests after the merge. The requirement is to test BEFORE changes are accepted, meaning the gate must happen at the PR stage, not post-merge.

Do I need a specific folder path in Cloud Build?

While the option mentions a specific folder, the key differentiator is the trigger mechanism (PR vs Merge). Cloud Build can be configured to watch specific directories within a repo for efficiency.

Minimizing GKE Logging Costs with SYSTEM Mode

Why not use an exclusion filter instead of changing the logging mode?

Exclusion filters run after logs are ingested into Cloud Logging, so you still pay for ingestion and analysis. Changing the mode to SYSTEM prevents the logs from being sent at all.

Does --logging=SYSTEM affect developer ability to view logs?

No, developers can still use kubectl logs to view application logs directly from the GKE nodes, as these logs remain on the local filesystem even if not exported to Cloud Logging.

Choosing a Latency SLO from Measured p90/p95 Performance

Why is Option B not the right latency SLO if it matches current performance?

An SLO equal to the current p90/p95 values leaves no meaningful error budget. Normal variance can consume the target immediately, causing false breaches even while users remain satisfied; C gives a small, deliberate buffer.

How much headroom should a latency SLO have over measured performance?

There is no universal number; the practice is modest, not huge. Here 190 ms p90 and 330 ms p95 keep the SLO close to the 160/300 ms baseline while allowing for normal variance; D is too relaxed.

What does the 28-day window represent in this SLO decision?

It is the measurement and compliance window. The observed percentiles over 28 days describe current behavior, while the published SLO uses that baseline plus error budget for the same window.

Resolving GCP Resource Location Constraint Violations for Secrets

Why can't I just add 'us' to the allowed locations?

The error specifically mentions attempting to create in '[global]'. Even if you add US regions, the default behavior of some services might still attempt to write to global metadata or intermediate states. Using user-managed replication explicitly defines the storage locations, preventing any ambiguity.

Does removing the org policy fix the error?

No. Removing the policy removes the compliance guardrail, allowing resources to be created in non-US regions, which violates the healthcare regulations stated in the question.

Google Cloud Workstations Cost Optimization with Idle Timeout

What is the difference between idleTimeout and runningTimeout in Cloud Workstations?

idleTimeout stops the workstation after a period of no user activity, preserving state for when the user returns. runningTimeout stops the workstation after a total cumulative runtime, regardless of whether the user is currently active.

Why is Cloud Workstations preferred over custom VMs for dev environments?

Cloud Workstations provides standardized, pre-configured IDEs, automatic scaling, and secure private access out-of-the-box, reducing administrative overhead compared to managing individual Compute Engine instances.

Cloud Deploy CD Pipeline with Manual QA

Why not use Canary deployment for manual QA?

Canary deployments shift a small percentage of traffic automatically. If QA must verify BEFORE any production traffic is processed, you cannot start a canary. You must deploy to a non-production stage first for manual checks.

What does 'standard deployment strategy' mean in Cloud Deploy?

It refers to deploying the new version to replace the old one (like a rolling update or blue/green) in the target environment, rather than gradually shifting traffic percentages as in a canary.

Error Budget Exhausted: Should You Deploy an Urgent Customer Feature?

Does an urgent feature for the largest customer justify an exception to an exhausted error budget?

Only if the error budget policy defines and approves an exception. The scenario provides no such exception, so the production deployment freeze still applies and the release should be delayed until the budget is replenished.

Why isn't a canary rollout to a subset of users acceptable here?

A canary reduces blast radius but is still a production deployment prohibited by the freeze. It does not address the exhausted error budget, and gradual rollout would bypass the governance the policy is meant to enforce.

What would change the answer?

An explicit policy exception for a critical reliability or security fix, or a scenario stating the error budget has been replenished, could permit deployment. Without that, passing unit tests does not satisfy the SLO-based gate.

GKE Cluster and Namespace Design for Data Isolation

Why not create a separate cluster for each application?

Creating a cluster per application leads to exponential management overhead and high costs, violating the requirement to minimize operational burden.

How do namespaces protect data in GKE?

Namespaces provide logical isolation; when combined with RBAC and Network Policies, they prevent unauthorized cross-application access within the same cluster.

Configuring Cloud Build Triggers for Semantic Versioning

Why not use .* tag pattern?

Using .* triggers on all tags, including development ones, which violates the 'minimize overhead' requirement and risks deploying untested code.

Can I use branch patterns for releases?

No, the scenario specifies releases are tagged. Using branch patterns would ignore the tag-based deployment strategy required.

Mitigating Downstream Service Failures with Circuit Breakers

Why not just retry Service B when it times out?

Retries can create a thundering herd effect, overwhelming an already unstable Service B. This increases latency for all users and can lead to complete service unavailability, violating the 500 ms SLO.

What is the role of the database in the circuit breaker pattern?

The database acts as a durable storage for requests that cannot be processed immediately due to the downstream failure. This ensures no data loss while the circuit is open, allowing for later processing once Service B recovers.

Improve GKE Deployment Rollback and Image Cleanup

What is the primary benefit of Cloud Deploy over Cloud Build for GKE?

Cloud Deploy provides native rollout and rollback management with automated health checks and approval gates, whereas Cloud Build requires custom scripting to manage deployment lifecycles.

How do Artifact Registry cleanup policies work?

They allow you to automatically delete container images based on rules like age, tag patterns, or the number of retained versions, without needing custom scripts or scheduled jobs.

Troubleshooting Silent Metric Loss in GMP Managed Collection

Why do metrics disappear silently in GMP managed collection?

Silent failures usually stem from misconfigured PodMonitoring resources, such as pointing to an invalid container port or using incorrect label selectors, preventing target discovery.

Does IAM role 'monitoring.servicesViewer' affect metric ingestion?

No, this role grants read access to existing metrics. It does not control the collection process itself, which depends on PodMonitoring configurations and service account permissions.

Cloud Run Secret Rotation with Secret Manager Volumes

Why not use environment variables for secret rotation in Cloud Run?

Environment variables are injected at startup. Rotating them requires a full redeployment. Mounted volumes allow the application to read updated secrets from the filesystem, which can be more flexible depending on the app's design.

Is it safe to bake secrets in Dockerfiles?

No. Secrets baked into Docker images are stored in the image layers and can be extracted from container registries. This is a significant security vulnerability.

Restoring Service Health After Canary Deployment Failure in Cloud Run

Why not create a new revision (Option C) instead of reverting?

Creating a new revision involves building, testing, and deploying a new container image, which takes significantly more time than adjusting Cloud Run's traffic splitting configuration. Traffic splitting is nearly instantaneous.

Is it ever okay to debug (Option D) during an active SLO breach?

While debugging is essential for long-term fix, standard SRE incident response prioritizes restoring service availability first. You should stabilize the system before investing time in detailed trace analysis.

Centralized OpenTelemetry Monitoring with BindPlane

Why not use Managed Service for Prometheus?

Managed Service for Prometheus focuses on Prometheus-native metrics. The question specifies OpenTelemetry, and BindPlane is the dedicated tool for managing OTel collector fleets and routing.

What is the role of the scoping project here?

The scoping project allows you to manage permissions and configurations centrally for all member projects, simplifying the administrative overhead of cross-project monitoring.

Skaffold Multiple Profiles for GKE Replica Counts

Why not use Kustomize for replica counts?

Kustomize requires defining patches and managing additional files. For simple scalar overrides like replicas, raw YAML is more direct and reduces configuration overhead.

Can I use a single profile for both envs?

No, a single profile applies one set of configurations. Multiple profiles allow distinct settings (e.g., 2 vs 5 replicas) to be activated per environment.

Binary Authorization Attestor Implementation

Why is Option D insufficient for Binary Authorization?

Option D configures the policy but does not create the attestor or sign the images. Without signatures, no image passes the policy check.

Does Binary Authorization require manual intervention?

No, when integrated with Cloud Build, the signing process can be automated via the pipeline, minimizing manual effort as requested.

Caching Container Dependencies in Artifact Registry

What is the difference between remote and standard Docker repositories in Artifact Registry?

Remote repositories proxy external registries (like Docker Hub) and cache images on demand. Standard repositories are used to store Docker images that you build and push yourself.

Why use a virtual repository for caching dependencies?

A virtual repository aggregates multiple remote repositories into a single endpoint. This simplifies pipeline configuration by allowing the CI system to pull from one URL instead of managing multiple remote endpoints.