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.
You manage a production Google Kubernetes Engine (GKE) Standard cluster running GKE Dataplane V2 with Flow Observability enabled. Application teams are reporting intermittent Connection timed out errors in the payments namespace after new NetworkPolicy manifests were deployed.
Your team must meet the following observability and troubleshooting requirements:
payments namespace while disabling logs for all allowed connections to minimize ingestion costs.NetworkPolicy and packet drops caused by node-level eBPF resource exhaustion.Which configuration and diagnostic approach should you implement?
default NetworkLogging resource with allow.log: false, allow.delegate: true, deny.log: true, and deny.delegate: true, and add policy.network.gke.io/enable-deny-logging: "true" to each NetworkPolicy in the payments namespace. Query policy-action logs by jsonPayload.policies.name to find blocked flows, and monitor hubble_drop_total for Policy denied events.This option attempts to use delegated Network Policy Logging on the default NetworkLogging resource while filtering policy-action logs by policy name and checking Hubble drop metrics. However, it introduces three distinct configuration and diagnostic errors that prevent logs from being generated or found.
NetworkLogging configuration: Setting spec.cluster.allow.delegate: true while spec.cluster.allow.log: false causes a validation failure (InvalidNetworkLogging). When the NetworkLogging specification is invalid, the network-logging-controller rejects the update and the configuration does not take effect.policy.network.gke.io/enable-deny-logging: "true" annotation must be applied to the Namespace object (payments), not to individual NetworkPolicy manifests. NetworkPolicy annotations (policy.network.gke.io/enable-logging: "true") only apply to allowed connections.policy-action logs do not contain a policies field because the Kubernetes NetworkPolicy API has no explicit deny rules; traffic is denied implicitly when no policy permits it.hubble_drop_total solely for Policy denied misses CT: Map insertion failed events, leaving conntrack table exhaustion undiagnosed.allow.delegate and deny.delegate must be false whenever their parent log field is false.enable-logging), whereas denied traffic delegation is controlled per Namespace (enable-deny-logging).disposition="allow" entries include the policies array listing matching policy names.This approach would work only if allow.delegate were set to false, the enable-deny-logging annotation were moved to the payments Namespace, the Cloud Logging query filtered on jsonPayload.disposition="deny" and jsonPayload.dest.namespace="payments" instead of policies.name, and hubble_drop_total were grouped by all reason labels.
Always run kubectl describe networklogging default after modifying logging settings to check the Events section for InvalidNetworkLogging warnings.
default NetworkLogging resource with allow.log: false, allow.delegate: false, deny.log: true, and deny.delegate: true, and annotate the payments namespace with policy.network.gke.io/enable-deny-logging: "true". Filter policy-action logs in Cloud Logging by jsonPayload.disposition="deny", and query hubble_drop_total in Cloud Monitoring to differentiate Policy denied from CT: Map insertion failed drops.GKE Dataplane V2 uses an eBPF-powered Linux kernel datapath that provides integrated Network Policy Logging via the cluster-scoped NetworkLogging custom resource (networking.gke.io/v1alpha1) and real-time eBPF flow telemetry via Hubble. While NetworkLogging exports structured ALLOW and DENY connection audit records to Cloud Logging under the policy-action log name, Hubble metrics (hubble_drop_total) exposed to Cloud Monitoring report granular kernel-level drop reasons across the packet lifecycle.
allow.log: false and allow.delegate: false completely suppresses high-volume allowed connection logs without triggering an invalid configuration error. Setting deny.log: true and deny.delegate: true activates delegated deny logging, ensuring denied connections are recorded only for Pods residing in namespaces annotated with policy.network.gke.io/enable-deny-logging: "true" (such as payments).logName="projects/PROJECT_ID/logs/policy-action" with jsonPayload.disposition="deny" surfaces all blocked connections in the payments namespace, including source/destination Pod metadata and aggregated retry count values over five-second windows.hubble_drop_total grouped by reason in Cloud Monitoring isolates Policy denied (explicit or implicit NetworkPolicy enforcement) from CT: Map insertion failed (exhaustion of the node-level eBPF connection tracking (conntrack) table).count field.hubble_drop_total surfaces datapath failures such as conntrack exhaustion or unsupported protocols that never appear in policy-action logs.Unlike cluster-wide logging (deny.delegate: false) or subnet-level VPC Flow Logs, this approach combines targeted Pod-level policy auditing in Cloud Logging with exact kernel drop-reason attribution in Cloud Monitoring. It avoids invalid NetworkLogging states and provides complete root-cause visibility across both Kubernetes policies and the underlying eBPF dataplane.
NetworkLogging resource named payments-logging with allow.log: false and deny.log: true, and enable VPC Flow Logs with INCLUDE_ALL_METADATA and Intranode Visibility on the cluster subnet. Inspect vpc_flows logs in Cloud Logging to identify which NetworkPolicy dropped the Pod traffic.NetworkLogging Resources and VPC Flow Logs DoVPC Flow Logs sample packets at the VPC subnet layer—reporting 5-tuple metadata, byte/packet counts, and GKE workload enrichment—while Intranode Visibility forces Pod-to-Pod traffic on the same node to hairpin through the VPC so subnet flow logs and VPC firewall rules can observe it. However, neither mechanism enforces or logs Kubernetes NetworkPolicy verdicts, and GKE does not permit creating additional NetworkLogging resources.
NetworkLogging name: GKE automatically provisions a single cluster-wide NetworkLogging object named default. Creating a second object such as payments-logging is unsupported because only one NetworkLogging resource can exist per cluster and it cannot be renamed.NetworkPolicy drop attribution in VPC Flow Logs: vpc_flows logs reflect traffic sampled at the VPC network boundary and VPC-level drops, not Pod-level eBPF NetworkPolicy decisions. Furthermore, ingress traffic blocked before reaching the VM/VPC pipeline or dropped internally by Pod policies cannot be attributed to a specific NetworkPolicy via vpc_flows.CT: Map insertion failed or Policy denied.NetworkLogging constraint: All policy logging rules—including namespace-scoped deny delegation—must be configured inside the existing default NetworkLogging object.policy-action logging.NetworkPolicy enforcement logging.Enabling VPC Flow Logs with INCLUDE_ALL_METADATA and Intranode Visibility would be appropriate if your goal were to analyze inter-zone data transfer costs, identify top talkers in Flow Analyzer, or audit external VPC firewall interactions rather than GKE NetworkPolicy drops and eBPF datapath errors.
In the GKE observability mental model, policy-action logs answer why a connection was blocked inside GKE, hubble_drop_total metrics reveal eBPF datapath drop reasons, and vpc_flows logs explain what happened to traffic at the VPC layer.
default NetworkLogging resource with allow.log: false, allow.delegate: false, deny.log: true, and deny.delegate: false. Filter policy-action logs using jsonPayload.disposition="deny" and jsonPayload.policies.name to isolate payments namespace denials, and treat CT: Map insertion failed in hubble_drop_total as a NetworkPolicy drop.Setting deny.delegate: false with deny.log: true instructs GKE Dataplane V2 to export denied connection logs for every namespace in the cluster to Cloud Logging. Meanwhile, hubble_drop_total emits distinct reason labels to separate Kubernetes NetworkPolicy blocks from kernel-level eBPF resource failures.
deny.delegate: false captures denied connections across all cluster namespaces rather than restricting logging exclusively to Pods in the payments namespace, unnecessarily increasing Cloud Logging ingestion volume.policies field on deny logs: Filtering policy-action logs by jsonPayload.policies.name fails for denied connections because disposition="deny" records omit the policies array entirely. Because Kubernetes NetworkPolicy uses an allow-list model, no single policy is responsible for a denial.CT: Map insertion failed as a NetworkPolicy block is incorrect. That reason code specifically indicates that the node's eBPF connection tracking (conntrack) table is exhausted, whereas NetworkPolicy blocks appear with reason="Policy denied".deny.delegate: true paired with the policy.network.gke.io/enable-deny-logging: "true" annotation on target namespaces.anetd metrics on port 9990), making unnecessary cluster-wide logging risky during traffic spikes.Policy denied maps to NetworkPolicy enforcement, while CT: Map insertion failed maps to conntrack map exhaustion and Unsupported L3 protocol maps to malformed or non-IPv4/IPv6 headers.This configuration would only be suitable if cluster-wide deny logging were explicitly desired across all namespaces, if Cloud Logging queries filtered by jsonPayload.dest.namespace="payments" instead of policies.name, and if CT: Map insertion failed were remediated as a node conntrack capacity issue rather than a policy rule error.
Note that even when a Pod has a default-deny NetworkPolicy, kubelet liveness, readiness, and startup probe traffic is automatically permitted by GKE and logged as disposition="allow" with an empty policy name ("").
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