Question 202 of 500
Deploying and implementing a cloud solutionmediumMultiple ChoiceObjective-mapped

Quick Answer

The answer is the sidecar pattern, which is the correct choice because it allows two containers to share the same network namespace within a single Pod, enabling the audit logger to intercept outbound traffic in GKE before it reaches the internet. By configuring the application container to route requests through the sidecar—typically via a localhost proxy or iptables rules—all outbound traffic is logged without external network hops. On the Google Associate Cloud Engineer exam, this scenario tests your understanding of Pod networking and the sidecar pattern as a fundamental Kubernetes design for traffic interception and logging. A common trap is confusing sidecars with init containers or multi-cluster setups; remember that only sidecars run concurrently and share the same namespace. Memory tip: think of the sidecar as a “silent partner” riding alongside the main container, filtering every packet that leaves the Pod.

Google ACE Deploying and implementing a cloud solution Practice Question

This ACE practice question tests your understanding of deploying and implementing a cloud solution. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A GKE application Pod needs a sidecar container that proxies all outbound network requests through an audit logger before they reach the internet. Both containers share the same network namespace. Which Kubernetes pattern implements this?

Question 1mediummultiple choice
Read the full NAT/PAT explanation →

Answer choices

Why each option matters

Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.

Correct answer & explanation

Add the audit logger as a second container in the same Pod spec (sidecar pattern)

Option B is correct because the sidecar pattern allows two containers to share the same network namespace within a single Pod, enabling the audit logger to intercept all outbound traffic from the application container before it reaches the internet. This is achieved by configuring the application container to route its outbound requests through the sidecar (e.g., via a localhost proxy or iptables rules), ensuring all traffic is logged without external network hops.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Run the audit logger as a separate Deployment and route traffic via a Service

    Why it's wrong here

    A separate Deployment doesn't share the network namespace — traffic routing via a Service adds latency and doesn't intercept all outbound traffic from the application transparently.

  • Add the audit logger as a second container in the same Pod spec (sidecar pattern)

    Why this is correct

    Containers in the same Pod share the network namespace — the sidecar can listen on localhost and proxy all traffic before it leaves the Pod's network namespace.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Use a DaemonSet for the audit logger on each node to intercept node-level traffic

    Why it's wrong here

    A node-level DaemonSet intercepts traffic at the node (iptables) level — it can't transparently proxy per-Pod application traffic without complex iptables rules.

  • Add an initContainer to start the audit logger before the main application

    Why it's wrong here

    InitContainers run to completion before the main container starts — they're for initialization tasks, not for running alongside the main container.

Common exam traps

Common exam trap: answer the scenario, not the keyword

Google Cloud often tests the distinction between initContainers and sidecars, where candidates mistakenly choose initContainers because they think 'start before the main app' implies ongoing traffic interception, but initContainers exit after completion and cannot proxy runtime traffic.

Detailed technical explanation

How to think about this question

Under the hood, the sidecar pattern leverages the Pod's shared network namespace (via the `pause` container), allowing the audit logger to bind to localhost and act as a transparent HTTP proxy (e.g., using Envoy or Squid) or manipulate iptables rules to redirect outbound traffic. A real-world scenario is in service mesh implementations like Istio, where an Envoy sidecar intercepts all ingress/egress traffic using iptables rules (e.g., `iptables -t nat -A OUTPUT -p tcp --dport 80 -j REDIRECT --to-port 15001`), ensuring logging and policy enforcement without application changes.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A healthcare organisation deploys an application with a public-facing web tier and a private database tier. The database subnet has no public IP and only accepts connections from the web tier's security group. Questions like this test whether you can design cloud network isolation using VNets/VPCs, subnets, and security group rules.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related ACE practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free ACE practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this ACE question test?

Deploying and implementing a cloud solution — This question tests Deploying and implementing a cloud solution — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Add the audit logger as a second container in the same Pod spec (sidecar pattern) — Option B is correct because the sidecar pattern allows two containers to share the same network namespace within a single Pod, enabling the audit logger to intercept all outbound traffic from the application container before it reaches the internet. This is achieved by configuring the application container to route its outbound requests through the sidecar (e.g., via a localhost proxy or iptables rules), ensuring all traffic is logged without external network hops.

What should I do if I get this ACE question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 30, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This ACE practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the ACE exam.