Prepare and test your skills

Prepare and test your skills

Free sample question with answers and detailed explanation below. The Professional Cloud Network Engineer practice bank has an additional 2,437 practice questions.Try 10 free realistic questions: instant score, no credit card, and no account required.
Your organization operates a multi-tenant Google Kubernetes Engine (GKE) Standard cluster using Cloud DNS for GKE (cluster scope) for internal service discovery. You need to deploy the external-dns operator to manage public A records in a Cloud DNS public managed zone (example.com.) for exposed LoadBalancer Services and Ingress resources.
Your deployment must enforce these security controls:
production-ingress with the dns-sync: enabled annotation to update DNS records.Which configuration should you implement?
external-dns Kubernetes ServiceAccount to an IAM service account granted roles/dns.admin, configure external-dns with --provider=google, --domain-filter=example.com., and --policy=sync across all namespaces, and apply a Kubernetes NetworkPolicy to block other namespaces from triggering DNS modifications.NetworkPolicy and --policy=sync without ownership controls doA Kubernetes NetworkPolicy (enforced by GKE Dataplane V2 or Calico) filters Layer 3 and Layer 4 network traffic between Pods and IP ranges. The --policy=sync flag authorizes external-dns to create, update, and delete DNS records in the target Cloud DNS zone.
NetworkPolicy controls Pod network packets, not Kubernetes API object watches. Because external-dns queries kube-apiserver rather than receiving direct traffic from tenant Pods, workloads in any namespace can still create Service or Ingress objects that trigger unauthorized DNS changes.--namespace=production-ingress and --annotation-filter=dns-sync=enabled, untrusted namespaces can claim hostnames in example.com..--policy=sync without --registry=txt and a unique --txt-owner-id allows external-dns to modify or delete DNS records managed by other clusters or administrators.NetworkPolicy operates strictly on network flows (IPs, ports, and protocols) and cannot inspect Kubernetes annotations or resource ownership.--policy=sync enables full record lifecycle management, making strict --txt-owner-id scoping mandatory in shared DNS zones.Role instead of ClusterRole) and operator flags are required to restrict which namespaces external-dns can read.external-dns were additionally restricted to production-ingress via --namespace and namespace-scoped RBAC, required --annotation-filter=dns-sync=enabled, and enforced --registry=txt with a unique --txt-owner-id instead of relying on NetworkPolicy for API-level authorization.
external-dns Kubernetes ServiceAccount to an IAM service account granted roles/dns.admin on the project hosting the public zone, and configure the operator with --provider=google, --namespace=production-ingress, --annotation-filter=dns-sync=enabled, --domain-filter=example.com., --zone-id-filter, --registry=txt, and a unique --txt-owner-id.external-dns configuration areWorkload Identity Federation for GKE allows a Kubernetes ServiceAccount (KSA) to impersonate an IAM service account (GSA) using short-lived OAuth tokens without static private keys. Combining this with scoped external-dns operator flags ensures automated synchronization of LoadBalancer and Ingress hostnames into a designated Cloud DNS public managed zone while enforcing multi-tenant isolation.
external-dns KSA to a GSA with roles/dns.admin via Workload Identity Federation eliminates static JSON key files in Kubernetes Secrets.--namespace=production-ingress (paired with a namespace-scoped RBAC Role and RoleBinding) and --annotation-filter=dns-sync=enabled ensures only explicitly opted-in resources in production-ingress trigger DNS updates.--domain-filter=example.com. and --zone-id-filter restricts API updates to the target public zone, while --registry=txt with a unique --txt-owner-id creates TXT ownership records so external-dns never overwrites records owned by other clusters.external-dns controller filters.LoadBalancer or Ingress resources.cluster.local) cleanly separated on Cloud DNS for GKE.Unlike node-level IAM roles, static Secrets, or L3/L4 NetworkPolicy rules, pairing Workload Identity Federation with Kubernetes RBAC and external-dns scope and TXT-ownership flags directly secures both Google Cloud API access and Kubernetes API resource processing.
roles/dns.admin directly to the GKE node pool's Compute Engine service account, point external-dns to the GKE-managed Cloud DNS private zone, and configure the operator with --provider=google, --annotation-filter=dns-sync=enabled, and --policy=upsert-only.Assigning roles/dns.admin to the GKE node pool's Compute Engine default or custom node service account grants DNS administrative permissions at the VM instance level. GKE-managed private zones are automatically created by Cloud DNS for GKE to store internal cluster Service records.
roles/dns.admin to the node pool service account violates least privilege because any Pod without Workload Identity isolation can obtain credentials from the node metadata server and alter Cloud DNS zones.external-dns at the GKE-managed private zone fails to publish public A records for example.com., and the GKE Cloud DNS controller overwrites any external modifications made to managed cluster zones.--namespace=production-ingress allows any namespace to add dns-sync: enabled and create records, and omitting --domain-filter, --zone-id-filter, and --txt-owner-id fails to restrict target zones or protect existing records.--policy=upsert-only prevents external-dns from deleting records, but it does not stop external-dns from overwriting existing records when --txt-owner-id is omitted.Wait—this architecture is fundamentally insecure for multi-tenant clusters; it would only be viable if replaced with Workload Identity Federation for GKE, pointed at the public example.com. zone, and scoped with --namespace, --domain-filter, --zone-id-filter, and --txt-owner-id.
example.com. as the custom cluster domain, deploy external-dns with a Kubernetes Secret containing a JSON key for a service account with roles/dns.admin, and grant cluster-wide RBAC permissions to watch all namespaces.Cloud DNS VPC scope is a GKE cluster DNS mode that automatically provisions private managed DNS zones so that internal Kubernetes Services can be resolved across an entire VPC network (and connected on-premises networks via Cloud VPN or Cloud Interconnect). A static JSON key stored in a Kubernetes Secret provides long-lived Google Cloud credentials directly inside the cluster.
LoadBalancer Services or Ingress resources in a public Cloud DNS managed zone.--namespace or --annotation-filter lets any tenant create or alter DNS records.--domain-filter, --zone-id-filter, and --txt-owner-id leaves other zones and external records unprotected.You only needed internal Service names (including headless Services) to be resolvable by Compute Engine VMs or on-premises clients across a VPC network, rather than automating public DNS records with external-dns.
Answer them yourself and get your score the moment you finish. No account needed.
Full access includes
Keep the momentum going with these hand-picked practice scenarios
Last updated Validated