2V0-71.23 exam dumps

2V0-71.23 practice question 165 of 355

VMware Certified Professional - Tanzu for Kubernetes Operations 2024. Associate level, VMware. Free question with the correct answer and a full explanation.

2V0-71.23 Question 165

Single answer

You are managing a Kubernetes cluster deployed with VMware Tanzu and are tasked with restricting traffic between specific workloads within a namespace. The development team requests that a particular pod only allows incoming traffic on port 8080 from pods with the label app=frontend. Which type of Kubernetes object should you configure to enforce this requirement?

  1. A

    NetworkPolicy

  2. B

    PodSecurityPolicy

  3. C

    Ingress

  4. D

    ClusterRole

Show answer and explanation

Correct answer: A

Explanation

To restrict network communication between pods within a namespace, Kubernetes NetworkPolicies are utilized. These policies allow defining rules that specify which pods can communicate with others, as well as which ports are allowed for communication. In this scenario, a NetworkPolicy can be configured to permit only traffic on port 8080 from pods with the label app=frontend to the targeted pod.

  • A. Correct.

    NetworkPolicy is the correct Kubernetes object to define and enforce rules for allowing or denying network traffic between pods, including specifying allowed ports and selectors for traffic sources.

  • B. Incorrect.

    PodSecurityPolicy is used to enforce security-related settings at the pod level, such as privilege escalation and allowed volume types, but it does not control network traffic.

  • C. Incorrect.

    Ingress is used to manage HTTP and HTTPS traffic to services from outside the cluster, not within the cluster or between pods.

  • D. Incorrect.

    ClusterRole is used to define permissions for Kubernetes resources at the cluster level but has no relation to network traffic control.

Timed practice exam

Take a 2V0-71.23 practice test under exam conditions

63 questions in 130 minutes, drawn from this bank, with a score report and a per-question review when you finish.

Start timed exam