Cloud Digital Leader Google Cloud Products and Services Practice Question
An engineer needs to deploy a containerized application on Google Kubernetes Engine (GKE) and ensure that each pod gets a static IP address that persists across rescheduling. Which networking approach should they use?
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
✓
Use a VPC-native cluster and assign a static internal IP using the `networking.gke.io/static-ip` annotation.
GKE supports static IP addresses for pods using VPC-native clusters and alias IP ranges. By reserving a static internal IP address and assigning it to the pod via a Kubernetes annotation, the IP persists even if the pod is rescheduled.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Use a VPC-native cluster and assign a static internal IP using the `networking.gke.io/static-ip` annotation.
Why this is correct
A VPC-native cluster assigns pod IPs directly from the VPC subnet, allowing the `networking.gke.io/static-ip` annotation to reserve a specific internal IP for a pod. This annotation binds that IP to the pod's network interface, ensuring the pod keeps the same address even after rescheduling. The reservation is managed by GKE and persists until the annotation is removed, making it ideal for workloads that require a fixed internal endpoint.
- ✗
Use a load balancer service of type LoadBalancer.
Why it's wrong here
A LoadBalancer service provisions a cloud load balancer with a stable external (or internal if using an internal load balancer) IP, but that IP fronts the entire service, not individual pods. Pods behind the load balancer retain their own ephemeral cluster IPs, which are not static and can change when the pods are recreated. This option solves a different problem: exposing a service to clients, not assigning static IPs to each pod.
- ✗
Use a DaemonSet to ensure one pod per node.
Why it's wrong here
A DaemonSet ensures exactly one pod runs on each node, typically for infrastructure components like log collectors or monitoring agents. However, DaemonSet pods are managed by the node's lifecycle; when a pod is deleted and recreated, it receives a new IP from the node's pod CIDR range. A DaemonSet has no mechanism to reserve or preserve specific IP addresses, so it cannot satisfy the requirement for a static internal IP per pod.
- ✗
Use a StatefulSet with a headless service.
Why it's wrong here
A StatefulSet with a headless service provides stable network identities via ordinal hostnames (e.g., pod-0.pod-headless.namespace.svc.cluster.local), but this does not guarantee static IP addresses. When a StatefulSet pod is rescheduled to a different node, it may receive a different IP, even though its hostname remains the same. To achieve truly static IPs, you must pair the StatefulSet with an explicit static IP reservation mechanism, such as the `networking.gke.io/static-ip` annotation, which this option does not include.
Go deeper
Related to this question
Learn chapter
Benefits of Google Cloud
Key term
Anthos
Anthos is a Google Cloud platform that lets you run applications consistently across different computing environments, like on-premises data centers and multiple public clouds.
Key term
Pod
A pod is the smallest deployable unit in Kubernetes, containing one or more containers that share storage, network, and a specification for how to run.
About these practice questions
One of 829 original GCDL practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This GCDL 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 GCDL exam.