Know, for any packet in your cluster, exactly what touches it and in what order: pod, CNI, Service, kube-proxy or eBPF, DNS, NetworkPolicy, and Gateway. A surprising chunk of delivery and incident tasks across the other four domains eventually boil down to this one.

needs make upmake gitea gitopsmake sec

Orientation

competency 1.1 · architecture best practices

Networking sits underneath everything else on the platform. A Crossplane XR that never turns Ready, an Argo CD app stuck Progressing, a Prometheus target that won't scrape, a canary that never sees traffic: half the time, the culprit is one mismatched Service selector, one missing DNS egress rule, or one unready endpoint.

What the exam actually asks

Nobody is going to ask you to write an essay on CNI plugins. You'll be asked to make traffic flow or block it cleanly, and prove it: expose an app, lock down a namespace, build a Gateway and HTTPRoute, or debug why a Service resolves in DNS and then refuses every connection. With a clear mental model, these are five-minute wins. Without one, they turn into twenty minutes of guesswork.

The four rules of the Kubernetes network model

  1. Every pod gets its own cluster-routable IP, with no NAT between pods.
  2. Pods on any node can reach pods on any other node without NAT.
  3. Node agents (kubelet, system daemons) can reach every pod on that node.
  4. A pod sees its own IP as the exact same address other pods use to reach it.

Your CNI plugin is whatever makes those four rules true, whether via routing, an overlay, or an eBPF datapath. Everything layered on top (Services, DNS, NetworkPolicies, Gateways) assumes that foundation holds. If it doesn't, everything above behaves strangely, which is why "is this a CNI problem or a Service problem?" is always your first fork when debugging network failures.

Services and what actually makes them work

ClusterIP · NodePort · LoadBalancer · headless

ClusterIP is a virtual IP that exists only as translation rules on each node: no interface owns it, nothing listens on it, and you can't meaningfully ping it. NodePort exposes that Service on a high port (30000–32767 by default) across every node. LoadBalancer layers an external IP on top of NodePort (in our lab, cloud-provider-kind hands those out). Headless (clusterIP: None) skips the VIP completely and returns pod IPs straight from DNS, which StatefulSets rely on for stable peer discovery. ExternalName is just a DNS CNAME with zero proxying.

Typespec bitsReaches it fromUse it when
ClusterIPdefaultinside the clusterthe 90% case; standard internal traffic
NodePorttype: NodePortany node IPbootstrapping, bare metal, quick demos
LoadBalancertype: LoadBalanceroutside the clusterreal external entry point (loadBalancerClass picks between implementations)
HeadlessclusterIP: NoneDNS returns pod IPsStatefulSet peers, client-side load balancing
ExternalNameexternalName: hostDNS CNAME onlyaliasing an external hostname
The real mental model

The Service itself doesn't route packets. The EndpointSlice behind it does, populated by whatever pods match the Service's selector. A Service with zero ready endpoints resolves cleanly in DNS and then refuses every connection, which is one of the exam's favorite troubleshooting setups. Check in this exact order every time: does the selector match the pod labels → are those pods Ready (readiness gates endpoint membership) → run kubectl get endpointslices -l kubernetes.io/service-name=<svc>.

Two nearby knobs control whether a pod receives traffic at all. A failing readinessProbe pulls the pod out of the EndpointSlice, which is how Kubernetes drains it gracefully. Setting publishNotReadyAddresses: true overrides that so clustered databases behind a headless Service can discover peers before they're ready to serve traffic. Finally, pairing terminationGracePeriodSeconds with a short preStop sleep closes the classic rollout race where a pod terminates before every node finishes removing its routing rules. Connection resets during deployments almost always trace right here.

Traffic policies

  • externalTrafficPolicy: Cluster (default) SNATs traffic and may bounce it to another node, so your backend sees the node's IP instead of the client's. Switching to Local preserves the real client IP and routes only to pods on the receiving node, with one trade-off: nodes with no matching pod blackhole traffic, so you rely on external load balancer health checks to steer around them.
  • internalTrafficPolicy: Local brings the same behavior inside the cluster: route to node-local endpoints only. Handy for node-local caches and log shippers.
  • sessionAffinity: ClientIP is the only stickiness native Services support. Anything smarter belongs in a Gateway or service mesh.

Five conditions, one request. Flip any switch off below to see which hop drops the packet, what the caller sees, and the exact command that proves it:

Command reflex

Reach for kubectl get endpointslices -l kubernetes.io/service-name=X instead of describe svc. It breaks out per-address conditions (ready, serving, terminating) rather than flattening them into a plain IP list, so half-broken rollouts jump off the screen immediately.

The datapath: kube-proxy, eBPF, and why this lab uses Cilium

Cilium · Hubble · identities

Traditional kube-proxy watches Services and EndpointSlices and programs every node: iptables mode builds DNAT chains (simple, though lookup cost grows with rule count), while IPVS mode uses kernel load balancing with real scheduling algorithms. eBPF datapaths like Cilium and Calico can replace kube-proxy outright, performing translation at the socket or TC layer, sidestepping rule-table scaling limits and giving you deep flow visibility.

client pod
   │ connect 10.96.0.42:80          ← ClusterIP, exists only as a rule
   ▼
[ datapath ]  kube-proxy iptables/IPVS  or  eBPF (Cilium, this lab)
   │ DNAT → picks one endpoint from the EndpointSlice
   ▼
backend pod IP 10.244.2.17:8080
   │
   ▼ policy is evaluated on the pod identity, not the Service VIP

Don't miss that last line. An ipBlock rule targeting a ClusterIP never matches because DNAT has already rewritten the destination to a pod IP before policy runs. That one quirk explains a whole category of "why is my NetworkPolicy doing nothing?" bugs, and section 3.3 springs the exact same trap with CloudNativePG.

Our lab swaps out kindnet for Cilium (with kube-proxy still running alongside it) for one huge reason: kindnet ignores NetworkPolicies completely. Practicing on a CNI that accepts your policies and enforces nothing teaches terrible muscle memory. Cilium also compiles pod labels into numeric identities (so policy stays rock-solid even as pod IPs churn) and ships Hubble, which prints live packet flows along with their verdicts: forwarded or dropped, and why.

Cilium extras worth knowing by name

CiliumNetworkPolicy covers things standard Kubernetes NetworkPolicy can't express: toFQDNs (allow api.github.com by domain name, enforced via DNS), toEntities (kube-apiserver, world, host, remote-node), and L7 HTTP/DNS/Kafka rules. You won't be quizzed on obscure CRD fields, but "how do you allow egress specifically to the API server?" is a fair scenario, and here the clean answer is toEntities: [kube-apiserver].

DNS: the layer that fails quietly

CoreDNS · search domains · ndots

Cluster names follow <svc>.<ns>.svc.cluster.local, served by CoreDNS in kube-system behind a Service still named kube-dns for historical reasons. Every pod's /etc/resolv.conf gets a search list and ndots:5, meaning any hostname with fewer than five dots gets tried against every search domain first. Look up backend.default.svc.cluster.local (only four dots!) and the resolver fires off four or five queries before hitting the right one. Appending a trailing dot (backend.default.svc.cluster.local.) skips the search list completely, a cheap, instant win for DNS-heavy apps.

RecordResolves toNotes
svc.ns.svc.cluster.localClusterIPstandard A record
svc.nsClusterIPworks through search domains
headless.ns.svc…all ready pod IPsmultiple A records; client picks one
pod-0.headless.ns.svc…one podstable StatefulSet peer identity
_port._tcp.svc.ns.svc…SRV recordnamed ports for peer discovery

You can override all of this per pod with spec.dnsPolicy and dnsConfig: ClusterFirst (default), None with explicit nameservers, or Default (inherit the node's resolver). That comes up whenever a workload has to resolve an external private DNS zone.

The silent failure this lab drills on purpose

team-a allows DNS egress through one explicit NetworkPolicy rule (UDP/TCP 53 to kube-dns). The netpol break drill deletes just that rule. Every pod stays Running, every probe stays green, and nothing in the namespace can resolve a single hostname. kubectl get pods won't give you a clue. You catch it by forcing a lookup from inside (nslookup) and spotting Hubble's DROPPED verdicts on port 53. This exact break comes back in section 4.6.

NetworkPolicy semantics

additive allow-lists · both ends must open
  • Policies are namespaced and always select pods, never Services.
  • Until a policy selects a pod for a given direction, everything in that direction is allowed. The moment any policy selects it, that direction becomes isolated.
  • Rules are strictly additive allow-lists: there is no deny rule. You open traffic by adding rules and tighten it only by removing them. That asymmetry is why the DNS break drill is sneaky: a deleted rule leaves no trace that it was ever there.
  • Ingress and egress are evaluated independently. Cross-namespace traffic needs an egress allow on the caller and an ingress allow on the destination. Hitting that wall once in section 1.4 ("Cross-tenant traffic must die") locks it in so you never waste exam time rediscovering it.
  • Default-deny is just a policy with an empty podSelector, policyTypes: [Ingress, Egress], and zero allow rules.
  • Watch your YAML indentation inside rules: namespaceSelector and podSelector in the same list item mean AND (those specific pods in those namespaces); split into two list items (with an extra dash) they mean OR. This single typo is the #1 NetworkPolicy bug.
Exam angle

When a prompt says "team-a may only talk to team-b's web service and DNS," that usually means three objects, not one: default-deny in team-a, an egress allow in team-a (for both team-b and DNS), and an ingress allow in team-b. Verify like a grader: run one curl that returns 200 and a second curl to something forbidden that times out.

Ingress vs Gateway API

Gateway API is the modern answer

Classic Ingress jammed everything into one object with no clear ownership and relied on a jungle of controller-specific annotations. Gateway API splits that cleanly by team role, and those role boundaries are the whole design point:

KindOwned bySays
GatewayClassinfrastructure providerwhich controller implements Gateways of this class
Gatewayplatform teamlisteners: ports, protocols, TLS, and which routes can attach
HTTPRoute / GRPCRoute / TCPRouteapplication teammatch rules, filters, weighted backends
ReferenceGrantthe referenced namespaceexplicit permission for cross-namespace backend or Secret references

Like NetworkPolicy, route attachment takes two hands to clap: the route points at a Gateway with parentRefs, and the Gateway's listener declares allowedRoutes (same namespace, selected namespaces, or all). If the Gateway refuses the attachment, kubectl apply still succeeds; you only see the rejection in the route's status.

Always grade your own Gateway work by reading three status conditions: Accepted (the controller understood and attached it), Programmed (the data plane is actually configured), and ResolvedRefs (every backend Service and TLS Secret exists and is permitted). Reading those three beats guessing every single time.

Lab heads-up

Our main cluster installs the Standard-channel Gateway API CRDs so you can author manifests and validate schemas, but there's no controller programming a data plane on the main cluster. Your Gateway will sit unprogrammed there, so don't confuse a clean apply with live routing. On the mesh cluster (make mesh), Istio actually implements Gateway API, giving you real Programmed: True status conditions with the exact same YAML.

One crucial neighbor Kubernetes doesn't ship out of the box: certificates. Every HTTPS listener points at a TLS Secret, and something has to mint and renew it. Usually that's cert-manager: an Issuer or ClusterIssuer (ACME, CA, or Vault) paired with a Certificate (or the cert-manager.io/cluster-issuer annotation right on the Gateway). We don't install cert-manager in this lab, but "how does that TLS cert get renewed?" is fair game in any architecture question, and a missing Secret is a classic cause of ResolvedRefs: False.

Gateway API also bridges straight into progressive delivery (section 2.5): weighted backendRefs on an HTTPRoute let controllers like Flagger shift live traffic by percentage instead of crude replica math.

Gateway API, field by field

listeners · matches · filters · weights · ReferenceGrant · status reasons

That role table gives you the architecture; an exam task hands you the exact fields. Our lab installs Gateway API v1.7 (October 2026), and everything below is Standard channel unless noted. Under the exam clock, kubectl explain gateway.spec.listeners --recursive and kubectl explain httproute.spec.rules --recursive give you the exact schema for whatever version sits in front of you.

Gateway listeners

  • name, port, protocol (HTTP, HTTPS, TLS, TCP, UDP) plus an optional hostname. Two listeners colliding on the same port, protocol, and hostname trigger Conflicted: True with reason HostnameConflict or ProtocolConflict.
  • tls.mode: Terminate (the Gateway decrypts TLS using tls.certificateRefs pointing to a kubernetes.io/tls Secret) or Passthrough (SNI-only routing, paired with TLSRoute). Pointing at a Secret in another namespace requires a ReferenceGrant in that Secret's namespace, or you'll hit ResolvedRefs: False with RefNotPermitted.
  • allowedRoutes.namespaces.from: Same (default), All, or Selector with a label selector; allowedRoutes.kinds narrows which route types can attach. This is the Gateway's half of the attachment handshake.
  • Gateway conditions: Accepted (reasons like ListenersNotValid or Pending), Programmed (AddressNotAssigned, NoResources), plus per-listener Accepted, ResolvedRefs, and Programmed. A Gateway referencing a class with no running controller sits at Accepted: Unknown indefinitely.

HTTPRoute rules

  • parentRefs attach to the Gateway; add sectionName (the listener name) or port to target one specific listener instead of all of them. Your route's hostnames must intersect the listener's hostname, otherwise you get Accepted: False (NoMatchingListenerHostname).
  • matches: items inside a single match entry are ANDed together (path AND headers AND queryParams AND method), while separate list entries are ORed. Path types are PathPrefix (default), Exact, and RegularExpression (implementation-specific). Omit matches entirely and it defaults to PathPrefix /, matching everything.
  • filters: RequestHeaderModifier, ResponseHeaderModifier, RequestRedirect, URLRewrite (mutually exclusive with redirect), RequestMirror, CORS (Standard since v1.5), and ExtensionRef for vendor CRDs. Filters replace almost every controller-specific Ingress annotation you used to memorize.
  • backendRefs: name, port, optional namespace (needs a ReferenceGrant), and weight (default 1). Weights are proportions of the sum: 90 and 10 split 90/10; 3 and 1 split 75/25. A rule with neither backendRefs nor a redirect returns HTTP 500, and a missing Service produces ResolvedRefs: False (BackendNotFound).
  • timeouts (Standard since v1.2): request bounds the entire exchange while backendRequest bounds a single attempt (and can't exceed request; 0s disables).
  • retry (Standard since v1.7): attempts (retries after the initial try; 0 disables), codes (unique status codes to retry), and backoff (base interval; curve and jitter are implementation-defined). Support is Extended, so verify your controller supports it before leaning on it.
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata: { name: web, namespace: infra }
spec:
  gatewayClassName: istio
  listeners:
    - name: https
      port: 443
      protocol: HTTPS
      hostname: "*.example.com"
      tls: { mode: Terminate, certificateRefs: [{ kind: Secret, name: wildcard-tls }] }
      allowedRoutes: { namespaces: { from: Selector, selector: { matchLabels: { tenant: "true" } } } }
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata: { name: demo, namespace: team-a }
spec:
  parentRefs: [{ name: web, namespace: infra, sectionName: https }]
  hostnames: ["demo.example.com"]
  rules:
    - matches: [{ path: { type: PathPrefix, value: /api } }]
      filters: [{ type: RequestHeaderModifier, requestHeaderModifier: { add: [{ name: X-Env, value: staging }] } }]
      backendRefs:
        - { name: demo-stable, port: 80, weight: 90 }
        - { name: demo-canary, port: 80, weight: 10 }

The neighbors that arrived recently

  • ReferenceGrant is v1 since v1.5: from (group, kind, namespace of the referrer) and to (group, kind, optionally name) in the namespace being referenced. It is consent, never a route: it grants nothing by itself.
  • BackendTLSPolicy (Standard since v1.4) configures TLS from the Gateway to the backend pods: targetRefs a Service, validation.hostname as SNI, and either caCertificateRefs or wellKnownCACertificates: System. Same namespace as the Service, by design.
  • ListenerSet (Standard since v1.5) lets a team add listeners to a shared Gateway without editing it; the Gateway must opt in with spec.allowedListeners.namespaces.from (default None). Parent listeners win conflicts. It also lifts the 64-listener ceiling.
  • TLSRoute is v1 since v1.5, and TCPRoute and UDPRoute since v1.6 (their v1alpha2 is deprecated); GRPCRoute has been Standard since v1.1.

Ingress to Gateway, mapped

IngressGateway API
IngressClassGatewayClass (controllerName instead of controller)
spec.tls[].secretName + hostsGateway listener protocol HTTPS, tls.certificateRefs, hostname
spec.rules[].host + pathsHTTPRoute hostnames + rules[].matches[].path
pathType Prefix / Exact / ImplementationSpecificPathPrefix / Exact / RegularExpression
backend.service.name/portbackendRefs[].name/port (+ weight)
controller annotations (rewrite, redirect, canary weight, CORS)filters and backendRefs weights, portable across controllers
one object, one ownerGateway owned by platform, HTTPRoute owned by the app team, ReferenceGrant by the referenced namespace

The community ingress2gateway CLI handles the mechanical conversion for common controllers. What it can't decide for you is ownership: who controls the Gateway, and which namespaces its listeners allow to attach.

How this gets tested

"Expose service X on host Y through the existing Gateway in namespace infra" boils down to three checks: does the Gateway's listener allow routes from your namespace (allowedRoutes), does your route's hostname match the listener's, and do status.parents[].conditions report Accepted: True and ResolvedRefs: True? Pointing at a Service in another namespace adds a fourth piece: a ReferenceGrant in the backend's namespace, not yours.

Datapath and architecture details scenarios love to name

kube-proxy modes · Cilium replacement · traffic distribution · Corefile knobs · HA and zones

kube-proxy modes and their replacement

ModeStatusWhat to remember
iptablesdefaultDNAT chains; rule count scales linearly with Services; minSyncPeriod and syncPeriod tune sync latency
ipvsdeprecated since v1.35kernel load balancing with real scheduling algorithms (rr, lc, sh); requires IPVS kernel modules
nftablesGA since v1.33kernel 5.13+; much faster endpoint updates; NodePorts default to --nodeport-addresses primary (node primary IP only)
kernelspaceWindows onlythe Windows counterpart
Cilium kube-proxy replacementHelm kubeProxyReplacement=truehandles ClusterIP, NodePort, LoadBalancer, and hostPort in eBPF; socket-level LB for east-west traffic (rewrites connect() directly, so there's no per-packet DNAT to trace); supports DSR and Maglev; verify mode with cilium status

Two Service fields worth knowing here: spec.trafficDistribution (GA since v1.33) accepts PreferSameZone or PreferSameNode (PreferClose is the older deprecated alias) as a soft preference, while externalTrafficPolicy / internalTrafficPolicy: Local override it. Also keep your deprecations straight: the old Endpoints API was deprecated in v1.33 in favor of EndpointSlice, and spec.externalIPs was deprecated in v1.36. When a prompt asks you to expose a workload, reach for LoadBalancer or Gateway API.

CoreDNS: the Corefile you'll be asked to read or edit

CoreDNS reads its config from the coredns ConfigMap in kube-system. Thanks to the reload plugin, edits take effect within about two minutes, with no pod restarts needed. Here's what each block in the stock Corefile does:

LineEffectKnob a task turns
kubernetes cluster.local in-addr.arpa ip6.arpa { pods insecure; fallthrough in-addr.arpa ip6.arpa; ttl 30 }serves cluster Service and Pod recordspods verified only returns pod A records for pods that actually exist; ttl runs 0–3600s (default 5)
forward . /etc/resolv.confsends non-cluster lookups upstreamforward . 172.16.0.1 pins a specific upstream; adding a second block corp.example:53 { forward . 10.0.0.53 } creates a stub domain
cache 30response cachebump the TTL for DNS-heavy tenants, or roll out NodeLocal DNSCache (a per-node DaemonSet cache that upgrades upstream queries to TCP and dodges conntrack races)
loop · reload · loadbalance · errors · health · ready · prometheus :9153loop detection, live config reload, A-record shuffling, error logging, probes, metricsleave these intact; temporarily add log when debugging live queries

On the pod side: dnsPolicy defaults to ClusterFirst, EXCEPT a hostNetwork: true pod silently falls back to the node's resolver unless you explicitly set ClusterFirstWithHostNet. Setting dnsPolicy: None with dnsConfig (up to 3 nameservers, 32 search domains, and options: [{name: ndots, value: "2"}]) cuts search-list chatter without rewriting every hostname to have a trailing dot. Server-side, the autopath plugin achieves the same thing, though it requires pods verified.

Policy quirks across engines

  • Always match a namespace by name using the immutable kubernetes.io/metadata.name label inside namespaceSelector; never leave an empty {}, which matches every namespace in the cluster.
  • In Cilium, ipBlock rules don't match pod or node IPs by default (unless you change policyCIDRMatchMode); Cilium selects pods by labels and identities. That's a second reason, beyond DNAT, why CIDR-based rules look like they do nothing.
  • CiliumClusterwideNetworkPolicy is the cluster-scoped twin of CiliumNetworkPolicy for global baseline rules like "everyone can reach DNS and the API server." Cilium 1.20 also supports the upstream ClusterNetworkPolicy API with admin and baseline tiers that ordinary tenant NetworkPolicies can't override.

Cluster architecture callouts

  • HA control plane: at least three control plane nodes. Stacked etcd (colocated on control plane nodes, kubeadm's default) is simpler to operate; external etcd needs six hosts, but losing a node no longer knocks out both an API server and an etcd member at once. Either way, put a load balancer in front of the API servers, because Kubernetes won't fail over the endpoint for you.
  • Availability zones: nodes carry topology.kubernetes.io/zone and region labels. Spread control planes across at least three zones, spread workloads with topologySpreadConstraints, and use WaitForFirstConsumer storage so volumes don't get provisioned in a zone your pod can't reach.
  • Scale ceilings worth keeping in your back pocket: 110 pods per node by default, 5,000 nodes, and 150,000 pods per cluster.
  • Multi-cluster delivery: run a hub Argo CD with cluster Secrets and an ApplicationSet clusters generator, or run one Flux instance per cluster watching clusters/<name> in a shared repo. Hub-and-spoke centralizes UI and credentials; agent-per-cluster keeps credentials local and rides out a hub outage cleanly. Section 2.2 digs into the objects.
The hostNetwork DNS trap

If a monitoring agent or CNI helper running with hostNetwork: true suddenly can't resolve cluster Services, it's almost always using dnsPolicy: ClusterFirst (which acts like Default on host-network pods). Flip it to ClusterFirstWithHostNet. This masquerades as a NetworkPolicy drop, and Hubble stays eerily quiet because the packet never even aimed at CoreDNS.

Exercises

click a title to collapse · tick the dot when its check passes

With gitops up, Argo CD sits behind a LoadBalancer (running server.insecure, so plain http):

kubectl -n argocd get svc argocd-server -o wide      # note the EXTERNAL-IP
kubectl -n argocd get endpointslices -l kubernetes.io/service-name=argocd-server
curl -s -o /dev/null -w '%{http_code}\n' http://<EXTERNAL-IP>
outputcaptured 2026-08-26
$ kubectl -n argocd get svc argocd-server -o wide      # note the EXTERNAL-IP
NAME            TYPE           CLUSTER-IP     EXTERNAL-IP   PORT(S)                      AGE   SELECTOR
argocd-server   LoadBalancer   10.96.20.112   172.18.0.9    80:30153/TCP,443:30860/TCP   25m   app.kubernetes.io/instance=argocd,app.kubernetes.io/name=argocd-server
$ kubectl -n argocd get endpointslices -l kubernetes.io/service-name=argocd-server
NAME                  ADDRESSTYPE   PORTS       ENDPOINTS      AGE
argocd-server-lm5nc   IPv4          8080,8080   10.244.1.181   25m
$ curl -s -o /dev/null -w '%{http_code}\n' http://172.18.0.9
200

The EXTERNAL-IP is real only while cloud-provider-kind runs; without it, kubectl -n argocd port-forward svc/argocd-server 8080:80 and curl localhost:8080 instead, and the rest of the exercise is unchanged. Now break it in a way you can explain:

kubectl -n argocd patch svc argocd-server --type=merge -p '{"spec":{"selector":{"app":"nope"}}}'
outputcaptured 2026-08-26
$ kubectl -n argocd patch svc argocd-server --type=merge -p '{"spec":{"selector":{"app":"nope"}}}'
service/argocd-server patched

Watch the endpointslice lose its endpoints and curl start failing while DNS still resolves. Then look at what your patch did before undoing it: kubectl -n argocd get svc argocd-server -o jsonpath='{.spec.selector}' shows the original two labels plus app: nope, because a JSON merge patch merges maps rather than replacing them. So the restore is removing your key, not re-adding theirs: --type=merge -p '{"spec":{"selector":{"app":null}}}'.

verify: the selector is back to exactly app.kubernetes.io/name: argocd-server and app.kubernetes.io/instance: argocd, and curl returns 200. The merge-patch semantics come up on their own exam tasks.

Run a probe that policy must kill:

cilium hubble port-forward &
kubectl -n team-a run probe --image=curlimages/curl:8.11.1 --restart=Never \
  -- curl -s -m 5 http://example.com
hubble observe --namespace team-a --verdict DROPPED --last 20
outputcaptured 2026-11-17
$ cilium hubble port-forward &
ℹ️  Hubble Relay is available at 127.0.0.1:4245
$ kubectl -n team-a run probe --image=curlimages/curl:8.11.1 --restart=Never \
  -- curl -s -m 5 http://example.com
Warning: would violate PodSecurity "restricted:latest": allowPrivilegeEscalation != false (container "probe" must set securityContext.allowPrivilegeEscalation=false), unrestricted capabilities (container "probe" must set securityContext.capabilities.drop=["ALL"]), runAsNonRoot != true (pod or container "probe" must set securityContext.runAsNonRoot=true), seccompProfile (pod or container "probe" must set securityContext.seccompProfile.type to "RuntimeDefault" or "Localhost")
pod/probe created
$ hubble observe --namespace team-a --verdict DROPPED --last 20
Nov 18 04:25:08.323: team-a/probe:55156 (ID:21174) <> 104.20.23.154:80 (world) policy-verdict:none EGRESS DENIED (TCP Flags: SYN)
Nov 18 04:25:08.323: team-a/probe:55156 (ID:21174) <> 104.20.23.154:80 (world) Policy denied DROPPED (TCP Flags: SYN)
Nov 18 04:25:09.373: team-a/probe:55156 (ID:21174) <> 104.20.23.154:80 (world) policy-verdict:none EGRESS DENIED (TCP Flags: SYN)
Nov 18 04:25:09.373: team-a/probe:55156 (ID:21174) <> 104.20.23.154:80 (world) Policy denied DROPPED (TCP Flags: SYN)
Nov 18 04:25:10.396: team-a/probe:55156 (ID:21174) <> 104.20.23.154:80 (world) policy-verdict:none EGRESS DENIED (TCP Flags: SYN)
Nov 18 04:25:10.396: team-a/probe:55156 (ID:21174) <> 104.20.23.154:80 (world) Policy denied DROPPED (TCP Flags: SYN)
Nov 18 04:25:10.806: team-a/probe:43610 (ID:21174) <> 172.66.147.243:80 (world) policy-verdict:none EGRESS DENIED (TCP Flags: SYN)
Nov 18 04:25:10.806: team-a/probe:43610 (ID:21174) <> 172.66.147.243:80 (world) Policy denied DROPPED (TCP Flags: SYN)
Nov 18 04:25:11.869: team-a/probe:43610 (ID:21174) <> 172.66.147.243:80 (world) policy-verdict:none EGRESS DENIED (TCP Flags: SYN)
Nov 18 04:25:11.869: team-a/probe:43610 (ID:21174) <> 172.66.147.243:80 (world) Policy denied DROPPED (TCP Flags: SYN)
Nov 18 04:25:12.892: team-a/probe:43610 (ID:21174) <> 172.66.147.243:80 (world) policy-verdict:none EGRESS DENIED (TCP Flags: SYN)
Nov 18 04:25:12.892: team-a/probe:43610 (ID:21174) <> 172.66.147.243:80 (world) Policy denied DROPPED (TCP Flags: SYN)
verify: DROPPED flows from the probe pod, and the pod's curl exits non-zero. This is the difference between "policy exists" and "policy enforces".

Write a Gateway named web using listener port 80, protocol HTTP, plus an HTTPRoute that matches path /demo and backends a Service demo:80. Don't copy from docs; build it from kubectl explain gateway.spec.listeners and kubectl explain httproute.spec.rules.

verify: both apply cleanly (schema-valid), and kubectl get gateway web -o yaml shows the spec you meant. Status stays unprogrammed here; on the mesh cluster Istio would accept the same manifests.

From a pod in default, resolve short and long names:

kubectl run dnsprobe --image=busybox:1.28 --restart=Never -it --rm -- \
  sh -c 'nslookup argocd-server.argocd && nslookup argocd-server.argocd.svc.cluster.local'
outputcaptured 2026-08-26
$ kubectl run dnsprobe --image=busybox:1.28 --restart=Never -it --rm -- \
  sh -c 'nslookup argocd-server.argocd && nslookup argocd-server.argocd.svc.cluster.local'
Server:    10.96.0.10
Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local

Name:      argocd-server.argocd
Address 1: 10.96.20.112 argocd-server.argocd.svc.cluster.local
Server:    10.96.0.10
Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local

Name:      argocd-server.argocd.svc.cluster.local
Address 1: 10.96.20.112 argocd-server.argocd.svc.cluster.local
All commands and output from this session will be recorded in container logs, including credentials and sensitive information passed through the command prompt.
If you don't see a command prompt, try pressing enter.
pod "dnsprobe" deleted from default namespace

(busybox:1.28 on purpose: newer busybox nslookup ignores the search path and returns NXDOMAIN for the short name even though the pod's resolver handles it fine. A famous trap, worth meeting here rather than in an exam.)

Then repeat inside team-a and explain why it still works (the tenant policy allows port 53 to kube-dns explicitly; find that rule in examples/multitenancy/team-a.yaml).

verify: both names resolve from both namespaces, and you can point at the exact policy rule that permits it.

There is no browser in the exam, and the Gateway API field names are the kind you half-remember. The CRDs carry their own documentation, so kubectl explain is the reference, and it is correct for the channel this cluster installed.

kubectl explain gateway.spec.listeners.allowedRoutes.namespaces.from
kubectl explain gateway.spec.listeners.allowedRoutes --recursive | head -12
kubectl explain httproute.spec.rules.backendRefs
outputcaptured 2026-09-13
$ kubectl explain gateway.spec.listeners.allowedRoutes.namespaces.from
GROUP:      gateway.networking.k8s.io
KIND:       Gateway
VERSION:    v1

FIELD: from <string>
ENUM:
    All
    Selector
    Same

DESCRIPTION:
    From indicates where Routes will be selected for this Gateway. Possible
    values are:
    
    * All: Routes in all namespaces may be used by this Gateway.
    * Selector: Routes in namespaces selected by the selector may be used by
      this Gateway.
    * Same: Only Routes in the same namespace may be used by this Gateway.
    
    Support: Core
    
$ kubectl explain gateway.spec.listeners.allowedRoutes --recursive | head -12
GROUP:      gateway.networking.k8s.io
KIND:       Gateway
VERSION:    v1

FIELD: allowedRoutes <Object>


DESCRIPTION:
    AllowedRoutes defines the types of routes that MAY be attached to a
    Listener and the trusted namespaces where those Route resources MAY be
    present.
    
$ kubectl explain httproute.spec.rules.backendRefs
GROUP:      gateway.networking.k8s.io
KIND:       HTTPRoute
VERSION:    v1

FIELD: backendRefs <[]Object>


DESCRIPTION:
    BackendRefs defines the backend(s) where matching requests should be
    sent.
    
    Failure behavior here depends on how many BackendRefs are specified and
    how many are invalid.
    
    If *all* entries in BackendRefs are invalid, and there are also no filters
    specified in this route rule, *all* traffic which matches this rule MUST
    receive a 500 status code.
    
    See the HTTPBackendRef definition for the rules about what makes a single
    HTTPBackendRef invalid.
    
    When a HTTPBackendRef is invalid, 500 status codes MUST be returned for
    requests that would have otherwise been routed to an invalid backend. If
    multiple backends are specified, and some are invalid, the proportion of
    requests that would otherwise have been routed to an invalid backend
    MUST receive a 500 status code.
    
    For example, if two backends are specified with equal weights, and one is
    invalid, 50 percent of traffic must receive a 500. Implementations may
    choose how that 50 percent is determined.
    
    When a HTTPBackendRef refers to a Service that has no ready endpoints,
    implementations SHOULD return a 503 for requests to that backend instead.
    If an implementation chooses to do this, all of the above rules for 500
    responses
    MUST also apply for responses that return a 503.
    
    Support: Core for Kubernetes Service
    
    Support: Extended for Kubernetes ServiceImport
... 76 more lines
verify: allowedRoutes.namespaces.from documents All, Selector and Same, and backendRefs lists weight next to name, namespace and port. A field you expected and cannot find is a field the standard channel does not ship.

A route in one namespace may not send traffic to a Service in another until the owner of that Service says so. The permission travels the other way from the reference, which is the part people get wrong under time pressure.

Run this on kind-mesh: the main cluster has the CRDs but no controller, so the route's status stays empty and there is nothing to read.

kubectl --context kind-mesh create ns team-a --dry-run=client -o yaml | kubectl --context kind-mesh apply -f -
kubectl --context kind-mesh create ns team-b --dry-run=client -o yaml | kubectl --context kind-mesh apply -f -
kubectl --context kind-mesh -n team-b create deployment web --image=nginx:1.27-alpine
kubectl --context kind-mesh -n team-b expose deployment web --port=80
kubectl --context kind-mesh apply -f - <<'EOF'
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata: { name: web, namespace: team-a }
spec:
  gatewayClassName: istio
  listeners:
    - name: http
      port: 80
      protocol: HTTP
      allowedRoutes: { namespaces: { from: Same } }
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata: { name: demo, namespace: team-a }
spec:
  parentRefs: [{ name: web }]
  rules:
    - backendRefs: [{ name: web, namespace: team-b, port: 80 }]
EOF
sleep 10
kubectl --context kind-mesh -n team-a get httproute demo -o jsonpath='{.status.parents[*].conditions}' | jq '.[] | {type, status, reason}'
kubectl --context kind-mesh apply -f - <<'EOF'
apiVersion: gateway.networking.k8s.io/v1beta1
kind: ReferenceGrant
metadata: { name: from-team-a, namespace: team-b }
spec:
  from: [{ group: gateway.networking.k8s.io, kind: HTTPRoute, namespace: team-a }]
  to: [{ group: "", kind: Service }]
EOF
sleep 10
kubectl --context kind-mesh -n team-a get httproute demo -o jsonpath='{.status.parents[*].conditions}' | jq '.[] | {type, status, reason}'
outputcaptured 2026-09-13
$ kubectl --context kind-mesh create ns team-a --dry-run=client -o yaml | kubectl --context kind-mesh apply -f -
namespace/team-a created
$ kubectl --context kind-mesh create ns team-b --dry-run=client -o yaml | kubectl --context kind-mesh apply -f -
namespace/team-b created
$ kubectl --context kind-mesh -n team-b create deployment web --image=nginx:1.27-alpine
deployment.apps/web created
$ kubectl --context kind-mesh -n team-b expose deployment web --port=80
service/web exposed
$ kubectl --context kind-mesh apply -f - <<'EOF'
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata: { name: web, namespace: team-a }
spec:
  gatewayClassName: istio
  listeners:
    - name: http
      port: 80
      protocol: HTTP
      allowedRoutes: { namespaces: { from: Same } }
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata: { name: demo, namespace: team-a }
spec:
  parentRefs: [{ name: web }]
  rules:
    - backendRefs: [{ name: web, namespace: team-b, port: 80 }]
EOF
gateway.gateway.networking.k8s.io/web created
httproute.gateway.networking.k8s.io/demo created
$ sleep 10
$ kubectl --context kind-mesh -n team-a get httproute demo -o jsonpath='{.status.parents[*].conditions}' | jq '.[] | {type, status, reason}'
{
  "type": "Accepted",
  "status": "True",
  "reason": "Accepted"
}
{
  "type": "ResolvedRefs",
  "status": "False",
  "reason": "RefNotPermitted"
}
{
  "type": "ResolvedWaypoints",
  "status": "True",
  "reason": "ResolvedWaypoints"
}
$ kubectl --context kind-mesh apply -f - <<'EOF'
apiVersion: gateway.networking.k8s.io/v1beta1
kind: ReferenceGrant
metadata: { name: from-team-a, namespace: team-b }
spec:
  from: [{ group: gateway.networking.k8s.io, kind: HTTPRoute, namespace: team-a }]
  to: [{ group: "", kind: Service }]
EOF
referencegrant.gateway.networking.k8s.io/from-team-a created
$ sleep 10
$ kubectl --context kind-mesh -n team-a get httproute demo -o jsonpath='{.status.parents[*].conditions}' | jq '.[] | {type, status, reason}'
{
  "type": "Accepted",
  "status": "True",
  "reason": "Accepted"
}
{
  "type": "ResolvedRefs",
  "status": "True",
  "reason": "ResolvedRefs"
}
{
  "type": "ResolvedWaypoints",
  "status": "True",
  "reason": "ResolvedWaypoints"
}
verify: ResolvedRefs is False with reason RefNotPermitted before the grant and True after it, with nothing about the route itself changed. The grant lives with the backend, not with the route.

Every cluster you inherit has a Corefile, and half the DNS incidents you will be handed are a plugin block someone added to it. Read the stock one, add a stub domain, and watch the reload land.

kubectl -n kube-system get cm coredns -o jsonpath='{.data.Corefile}' | tee /tmp/Corefile.orig
printf '%s\nconsul.local:53 {\n    errors\n    cache 30\n    forward . 10.150.0.1\n}\n' "$(cat /tmp/Corefile.orig)" > /tmp/Corefile.new
kubectl -n kube-system create configmap coredns --from-file=Corefile=/tmp/Corefile.new --dry-run=client -o yaml | kubectl -n kube-system apply -f -
sleep 120
kubectl -n kube-system logs deploy/coredns --tail=10
kubectl -n kube-system create configmap coredns --from-file=Corefile=/tmp/Corefile.orig --dry-run=client -o yaml | kubectl -n kube-system apply -f -
outputcaptured 2026-11-17
$ kubectl -n kube-system get cm coredns -o jsonpath='{.data.Corefile}' | tee /tmp/Corefile.orig
.:53 {
    errors
    health {
       lameduck 5s
    }
    ready
    hosts {
        172.18.0.6 gitea.lab
        172.18.0.2 kind-registry
        fallthrough
    }
    kubernetes cluster.local in-addr.arpa ip6.arpa {
       pods insecure
       fallthrough in-addr.arpa ip6.arpa
       ttl 30
    }
    prometheus :9153
    forward . /etc/resolv.conf {
       max_concurrent 1000
    }
    cache 30 {
       disable success cluster.local
       disable denial cluster.local
    }
    loop
    reload
    loadbalance
}
$ printf '%s\nconsul.local:53 {\n    errors\n    cache 30\n    forward . 10.150.0.1\n}\n' "$(cat /tmp/Corefile.orig)" > /tmp/Corefile.new
$ kubectl -n kube-system create configmap coredns --from-file=Corefile=/tmp/Corefile.new --dry-run=client -o yaml | kubectl -n kube-system apply -f -
configmap/coredns configured
$ sleep 120
$ kubectl -n kube-system logs deploy/coredns --tail=10
Found 2 pods, using pod/coredns-57ddcc67ff-5gsk2
maxprocs: Leaving GOMAXPROCS=16: CPU quota undefined
[INFO] plugin/ready: Plugins not ready: "kubernetes"
.:53
[INFO] plugin/reload: Running configuration SHA512 = 21ac5a0b49ecc87479896d161ce04e13d5464755235ff622730e3dfae4608be276f4a5f8b10043b699e176d468200893ab00c7ce401fe4e331b9c0e19f77eb6d
CoreDNS-1.14.6
linux/amd64, go1.26.5, 424d125
[INFO] Reloading
[INFO] plugin/reload: Running configuration SHA512 = fa9459fcfd404334de10bf2f59ce4f79c08316d97dff8ba20f46ce959b71a49c67999e92a94381f4cab42431a2af64dcc71ec6d1681cd790c23927cc3c07ac13
[INFO] Reloading complete
$ kubectl -n kube-system create configmap coredns --from-file=Corefile=/tmp/Corefile.orig --dry-run=client -o yaml | kubectl -n kube-system apply -f -
configmap/coredns configured
verify: the log shows a reload line naming the new plugin set, and resolution of everything else is unaffected. Break the block on purpose (drop a brace) and the same log line becomes a parse error with the offending line number; that error is the one you will be shown in a task.

A pod on the host network gets the node's resolver unless you say otherwise, so cluster names stop resolving and nothing in the pod spec looks wrong. It is a two-word fix and a favorite of exam authors.

kubectl run hn --image=busybox:1.28 --restart=Never --overrides='{"spec":{"hostNetwork":true}}' -- nslookup kubernetes.default
sleep 15
kubectl logs hn
kubectl run hn2 --image=busybox:1.28 --restart=Never --overrides='{"spec":{"hostNetwork":true,"dnsPolicy":"ClusterFirstWithHostNet"}}' -- nslookup kubernetes.default
sleep 15
kubectl logs hn2
kubectl delete pod hn hn2
outputcaptured 2026-09-12
$ kubectl run hn --image=busybox:1.28 --restart=Never --overrides='{"spec":{"hostNetwork":true}}' -- nslookup kubernetes.default
pod/hn created
$ sleep 15
$ kubectl logs hn
nslookup: can't resolve 'kubernetes.default'
Server:    172.18.0.1
Address 1: 172.18.0.1 omarchy
$ kubectl run hn2 --image=busybox:1.28 --restart=Never --overrides='{"spec":{"hostNetwork":true,"dnsPolicy":"ClusterFirstWithHostNet"}}' -- nslookup kubernetes.default
pod/hn2 created
$ sleep 15
$ kubectl logs hn2
Server:    10.96.0.10
Address 1: 10.96.0.10 kube-dns.kube-system.svc.cluster.local

Name:      kubernetes.default
Address 1: 10.96.0.1 kubernetes.default.svc.cluster.local
$ kubectl delete pod hn hn2
pod "hn" deleted from default namespace
pod "hn2" deleted from default namespace
verify: the first pod cannot resolve kubernetes.default and the second can, with dnsPolicy: ClusterFirstWithHostNet the only difference between them.

Cilium may or may not be doing kube-proxy's job, and the answer changes what you look at when a Service stops working. Ask the agent rather than guessing from the pod list.

kubectl -n kube-system exec ds/cilium -c cilium-agent -- cilium-dbg status | grep -i -A2 'KubeProxyReplacement'
kubectl -n kube-system get cm cilium-config -o jsonpath='{.data.kube-proxy-replacement}{"\n"}'
kubectl -n kube-system get ds -l k8s-app=kube-proxy
outputcaptured 2026-09-13
$ kubectl -n kube-system exec ds/cilium -c cilium-agent -- cilium-dbg status | grep -i -A2 'KubeProxyReplacement'
KubeProxyReplacement:    False   
Host firewall:           Disabled
SRv6:                    Disabled
$ kubectl -n kube-system get cm cilium-config -o jsonpath='{.data.kube-proxy-replacement}{"\n"}'
false
$ kubectl -n kube-system get ds -l k8s-app=kube-proxy
NAME         DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR            AGE
kube-proxy   3         3         3       3            3           kubernetes.io/os=linux   16h
verify: the agent's own report and the ConfigMap key agree, and you can say whether iptables or eBPF is programming Service VIPs on this cluster.

trafficDistribution is a hint, not a rule: the field is accepted anywhere, but the EndpointSlice controller only writes zone hints when the endpoints carry zones. On kind the nodes have no zone label until you add one, which makes the mechanism easy to see.

kubectl create deployment demo --image=nginx:1.27-alpine --replicas=4
kubectl expose deployment demo --port=80
kubectl patch svc demo -p '{"spec":{"trafficDistribution":"PreferSameZone"}}'
kubectl get svc demo -o jsonpath='{.spec.trafficDistribution}{"\n"}'
kubectl get endpointslices -l kubernetes.io/service-name=demo -o yaml | grep -B2 -A3 hints
kubectl label node cnpe-worker topology.kubernetes.io/zone=a --overwrite
kubectl label node cnpe-worker2 topology.kubernetes.io/zone=b --overwrite
kubectl rollout restart deployment demo
kubectl rollout status deployment demo
kubectl get endpointslices -l kubernetes.io/service-name=demo -o yaml | grep -B2 -A3 hints
# the scheduling exercises on this page assume unzoned nodes
kubectl delete svc demo --ignore-not-found
kubectl delete deployment demo --ignore-not-found
kubectl label node cnpe-worker topology.kubernetes.io/zone-
kubectl label node cnpe-worker2 topology.kubernetes.io/zone-
outputcaptured 2026-09-12
$ kubectl create deployment demo --image=nginx:1.27-alpine --replicas=4
deployment.apps/demo created
$ kubectl expose deployment demo --port=80
service/demo exposed
$ kubectl patch svc demo -p '{"spec":{"trafficDistribution":"PreferSameZone"}}'
service/demo patched
$ kubectl get svc demo -o jsonpath='{.spec.trafficDistribution}{"\n"}'
PreferSameZone
$ kubectl get endpointslices -l kubernetes.io/service-name=demo -o yaml | grep -B2 -A3 hints
$ kubectl label node cnpe-worker topology.kubernetes.io/zone=a --overwrite
node/cnpe-worker labeled
$ kubectl label node cnpe-worker2 topology.kubernetes.io/zone=b --overwrite
node/cnpe-worker2 labeled
$ kubectl rollout restart deployment demo
deployment.apps/demo restarted
$ kubectl rollout status deployment demo
Waiting for deployment spec update to be observed...
Waiting for deployment "demo" rollout to finish: 1 out of 4 new replicas have been updated...
Waiting for deployment "demo" rollout to finish: 1 out of 4 new replicas have been updated...
Waiting for deployment "demo" rollout to finish: 2 out of 4 new replicas have been updated...
Waiting for deployment "demo" rollout to finish: 2 out of 4 new replicas have been updated...
Waiting for deployment "demo" rollout to finish: 2 out of 4 new replicas have been updated...
Waiting for deployment "demo" rollout to finish: 2 out of 4 new replicas have been updated...
Waiting for deployment "demo" rollout to finish: 2 out of 4 new replicas have been updated...
Waiting for deployment "demo" rollout to finish: 2 out of 4 new replicas have been updated...
Waiting for deployment "demo" rollout to finish: 2 out of 4 new replicas have been updated...
Waiting for deployment "demo" rollout to finish: 2 out of 4 new replicas have been updated...
Waiting for deployment "demo" rollout to finish: 3 out of 4 new replicas have been updated...
Waiting for deployment "demo" rollout to finish: 3 out of 4 new replicas have been updated...
Waiting for deployment "demo" rollout to finish: 1 old replicas are pending termination...
Waiting for deployment "demo" rollout to finish: 1 old replicas are pending termination...
Waiting for deployment "demo" rollout to finish: 1 old replicas are pending termination...
Waiting for deployment "demo" rollout to finish: 1 old replicas are pending termination...
Waiting for deployment "demo" rollout to finish: 3 of 4 updated replicas are available...
deployment "demo" successfully rolled out
$ kubectl get endpointslices -l kubernetes.io/service-name=demo -o yaml | grep -B2 -A3 hints
      serving: true
      terminating: false
    hints:
      forZones:
      - name: a
    nodeName: cnpe-worker
--
      serving: true
      terminating: false
    hints:
      forZones:
      - name: b
    nodeName: cnpe-worker2
--
      serving: true
      terminating: false
    hints:
      forZones:
      - name: a
    nodeName: cnpe-worker
--
      serving: true
      terminating: false
    hints:
      forZones:
      - name: b
    nodeName: cnpe-worker2
$ # the scheduling exercises on this page assume unzoned nodes
$ kubectl delete svc demo --ignore-not-found
service "demo" deleted from default namespace
$ kubectl delete deployment demo --ignore-not-found
deployment.apps "demo" deleted from default namespace
$ kubectl label node cnpe-worker topology.kubernetes.io/zone-
node/cnpe-worker unlabeled
$ kubectl label node cnpe-worker2 topology.kubernetes.io/zone-
node/cnpe-worker2 unlabeled
verify: hints appear only once the nodes carry topology.kubernetes.io/zone, and each endpoint's hint names its own zone. Clean up the labels afterwards so the scheduling exercises still behave.

Self-check

answer out loud before opening
A Service resolves in DNS but every connection is refused. Name the three things you check, in order.

First, compare the Service selector against the actual pod labels. Second, check pod readiness (unready pods don't join the slice). Third, inspect the EndpointSlice directly. Addresses marked ready: false point to a failing readiness probe; an empty slice points to a selector mismatch or unscheduled pods.

Why does a NetworkPolicy ipBlock naming a Service's ClusterIP never work?

Because DNAT rewrites the ClusterIP to a backend pod IP before policy runs. NetworkPolicy operates on pod selectors and identities, not virtual IPs. To allow egress specifically to the API server in Cilium, use toEntities: [kube-apiserver].

Your backend needs the real client IP. What do you change, and what breaks?

Set externalTrafficPolicy: Local on the Service. The trade-off: nodes without a matching pod stop forwarding that traffic, so you now depend on your external load balancer's health checks to route around them, and traffic distribution becomes less even than with Cluster.

What is the difference between a headless Service and a ClusterIP Service with one endpoint?

A headless Service has no VIP and no datapath translation: DNS hands back pod IPs straight to the client. Even with a single endpoint, a normal ClusterIP Service still routes through the VIP rules, hiding the pod IP. StatefulSets need headless Services for stable per-pod hostnames like pod-0.svc….

Team-a can curl team-b's Service after you added an egress allow, but it still fails. What did you forget?

team-b's ingress policy. NetworkPolicies are independent allow-lists at both ends, so both sides have to open up. Also double-check DNS: once team-a restricts egress, resolving web.team-b.svc requires an explicit port-53 allow to kube-dns.

An HTTPRoute applies cleanly but nothing routes. Where do you look first?

Check status.parents[].conditions on the HTTPRoute. Accepted: False usually means the Gateway's allowedRoutes rejected attachment; ResolvedRefs: False means a backend Service or TLS Secret is missing (or lacks a cross-namespace ReferenceGrant). On the Gateway itself, Programmed: False means no data plane controller is running, which is always true on this lab's main cluster.

An HTTPRoute in team-a references a Service in team-b. Which object, in which namespace, and what does status say until it exists?

Create a ReferenceGrant in team-b (the target namespace) with from matching group gateway.networking.k8s.io, kind HTTPRoute, namespace team-a, and to matching kind Service. Until that grant exists, the route reports ResolvedRefs: False (reason RefNotPermitted) and returns HTTP 500 for that backend.

Two backendRefs carry weight 3 and weight 1. What split is that, and what happens if one backend Service is missing?

A 75/25 split, since weights are shares of the total (3 + 1 = 4). If one Service is missing, the route reports ResolvedRefs: False (BackendNotFound), keeps forwarding traffic to the valid backend, and returns HTTP 500 for the broken backend's share, causing intermittent errors proportional to its weight.

A stub domain for corp.example must resolve via 10.0.0.53. Where does the change go and how long before it applies?

Add a second server block to the coredns ConfigMap in kube-system: corp.example:53 { errors; cache 30; forward . 10.0.0.53 }. The reload plugin picks it up within about two minutes with no pod restarts. Verify with nslookup from a pod, and check kubectl -n kube-system logs deploy/coredns for parse errors if it doesn't take.

Which kube-proxy mode is GA and newest, and what changes for NodePort when you switch to it?

nftables, GA since Kubernetes 1.33 (kernel 5.13+). NodePorts default to --nodeport-addresses primary, meaning they only answer on the node's primary IP (other interfaces and localhost stop responding), and kube-proxy stops opening firewall rules for the NodePort range. IPVS is deprecated as of 1.35; iptables remains the default.

Docs to know your way around

study time, not exam time
  • kubernetes.io: Services, DNS for Services and Pods, Network Policies. The DNS page's search-domain section is the one people never read.
  • gateway-api.sigs.k8s.io: the API model page with the role diagram; the "route attachment" section.
  • docs.cilium.io: Hubble observe reference; CiliumNetworkPolicy entities and FQDN rules.
  • Offline, in the exam: kubectl explain service.spec, kubectl explain networkpolicy.spec.egress, kubectl explain httproute.spec.rules --recursive. Faster than docs and always version-correct for the cluster in front of you.
  • gateway-api.sigs.k8s.io/reference/spec: the field reference for Gateway listeners, HTTPRoute matches/filters/backendRefs, ReferenceGrant, BackendTLSPolicy and ListenerSet; the condition reasons (NotAllowedByListeners, RefNotPermitted, BackendNotFound) are listed there verbatim.
  • kubernetes.io/docs/reference/networking/virtual-ips: kube-proxy modes, traffic policies, terminating endpoints and trafficDistribution on one page.
  • kubernetes.io/docs/tasks/administer-cluster/dns-custom-nameservers: the stock Corefile with every plugin explained, and the stub-domain example you will copy under time pressure.
free before 1.2make down-gitopsmake down-sec