Certified Kubernetes Application Developer (CKAD) Practice Test

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

Prepare for the Certified Kubernetes Application Developer (CKAD) Exam. Gain confidence with flashcards and multiple-choice questions, complete with hints and explanations. Achieve your certification with ease!

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.


When you create a network policy to allow incoming traffic, what is the right setting to use?

  1. policyTypes set to Ingress

  2. policyTypes set to Egress

  3. policyTypes set to None

  4. policyTypes set to Both

The correct answer is: policyTypes set to Ingress

To allow incoming traffic in a Kubernetes cluster, the correct setting is to specify the policyTypes as Ingress. Ingress network policies control the traffic that is allowed to enter a pod, meaning they define rules about what sources are permitted to communicate with the pods targeted by these policies. When you set policyTypes to Ingress, it explicitly indicates that the defined rules should apply to incoming connections. This enables you to define which pods, namespaces, or CIDR blocks can access the application running on the pod by specifying selectors and rules. Setting policyTypes to Egress would instead manage outgoing traffic from the pod to other destinations, which is not the purpose when you are aiming to control incoming requests. Similarly, choosing None does not provide any traffic control as it would imply no rules apply, which could lead to unrestricted access depending on your default settings. Setting both Ingress and Egress could over-complicate the scenario when you only want to focus on allowing incoming traffic specifically. Thus, specifying policyTypes set to Ingress is the precise approach for managing incoming network traffic properly.