Certified Kubernetes Application Developer (CKAD) Practice Test

Disable ads (and more) with a membership for a one time $2.99 payment

Enhance your skills for the CKAD exam. Study with curated quizzes and detailed explanations. Prepare effectively for your success!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


What does the 'podSelector' field in a network policy specify?

  1. The types of Pods that can communicate with each other

  2. The specific Pods that are affected by the policy

  3. The labels that identify Pods for traffic routing

  4. The order in which Pods are deployed

The correct answer is: The labels that identify Pods for traffic routing

The 'podSelector' field in a network policy is primarily used to define which Pods the policy is applicable to by specifying the labels that identify those Pods. When a network policy is created, the 'podSelector' allows the policy to target specific Pods based on their labels. This means that only Pods that match the specified labels will be affected by the rules within that network policy. For example, a policy might apply to all Pods with a certain application label, thereby controlling the ingress or egress traffic for those particular Pods. This functionality is essential for implementing micro-segmentation within a Kubernetes cluster, ensuring that network traffic can be restricted based on the characteristics of the Pods, such as their roles or functions, as designated by their labels. The other options do not accurately describe the role of the 'podSelector'. While options discussing types of communication and affected Pods touch on relevant themes, they do not capture the core function of 'podSelector', which is to identify Pods for the implementation of the network policy based on labels.