Try each one before opening the answer. Every option is explained, with the CNCF documentation page that proves it.
Question 1 · choose 1
A node-level monitoring agent runs with hostNetwork: true and must keep it. To let it scrape a database on port 9187, the team adds an ingress rule to the database's NetworkPolicy with a podSelector that matches the agent's labels, yet the scrapes are still dropped. The network plugin uses the most common implementation for such Pods. What does the NetworkPolicy documentation point to?
AAdd a namespaceSelector that matches the agent's namespace to the same from entry
BAllow the nodes' IP addresses with an ipBlock rule instead of the podSelector
CGrant the agent's service account get on the database Service through RBAC
DAdd Egress to the database policy's policyTypes next to Ingress
Show the answer and why
AAdd a namespaceSelector that matches the agent's namespace to the same from entry
Incorrect
In the common implementation hostNetwork Pods are ignored by namespace selectors as well as pod selectors, so another selector does not match them.
BAllow the nodes' IP addresses with an ipBlock rule instead of the podSelector
Correct
Most plugins cannot tell hostNetwork Pod traffic apart and ignore those Pods in selectors; their connections look like node traffic, which an ipBlock rule can allow.
CGrant the agent's service account get on the database Service through RBAC
Incorrect
RBAC authorizes API requests; it has no effect on which network connections a NetworkPolicy allows.
DAdd Egress to the database policy's policyTypes next to Ingress
Incorrect
That would also restrict the database's outgoing traffic; it does not change how the incoming scrape from a hostNetwork Pod is matched.
NetworkPolicy behavior for hostNetwork Pods is undefined, and the most common implementation ignores them when matching podSelector and namespaceSelector. Because they share their node's IP address, their traffic is treated as node traffic, and the documentation suggests allowing it with an ipBlock rule.
An auditor reviews the kube-proxy settings of a cluster and finds that no kube-proxy runs on any node, yet Services work normally. According to the Kubernetes networking overview, what explains this?
AThe API server forwards all Service traffic itself when kube-proxy is absent
BThe kubelet takes over kube-proxy's job automatically on every node
CServices fall back to DNS answers with the Pod IPs, so no proxy is needed
DThe pod network implementation provides its own service proxy in place of kube-proxy
Show the answer and why
AThe API server forwards all Service traffic itself when kube-proxy is absent
Incorrect
Service traffic is routed by a service proxy implementation that programs the data plane on the nodes, not by the API server.
BThe kubelet takes over kube-proxy's job automatically on every node
Incorrect
The overview names kube-proxy as the default service proxy and some pod network implementations as the alternative; the kubelet is not one.
CServices fall back to DNS answers with the Pod IPs, so no proxy is needed
Incorrect
Services provide a stable IP whose traffic a service proxy routes to the backends; there is no fallback that removes the proxy.
DThe pod network implementation provides its own service proxy in place of kube-proxy
Correct
The overview says kube-proxy is Kubernetes' default service proxy, but some pod network implementations use their own, more tightly integrated service proxy instead.
Kubernetes defines the Service API, and a service proxy implementation watches Services and EndpointSlices and programs the data plane. kube-proxy is the default implementation, but some pod network implementations replace it, so a security review of Service routing has to look at that implementation instead.
Which component assigns IP addresses to Pods in a Kubernetes cluster?
Akube-apiserver
Bkube-proxy
CThe kube-scheduler
DThe network plugin
Show the answer and why
Akube-apiserver
Incorrect
The API server assigns IP addresses to Services, not to Pods.
Bkube-proxy
Incorrect
kube-proxy implements Service routing; it does not assign Pod addresses.
CThe kube-scheduler
Incorrect
The scheduler chooses a node for each Pod; it does not assign addresses.
DThe network plugin
Correct
The cluster networking page says the network plugin is configured to assign IP addresses to Pods.
Kubernetes needs non-overlapping ranges for Pods, Services and Nodes: the network plugin assigns Pod IPs, kube-apiserver assigns Service IPs, and the kubelet or cloud-controller-manager assigns node addresses.