In Kubernetes, what does an 'Ingress' rule in a NetworkPolicy define?

Prepare for the KCNA Certification Test. Study with flashcards, multiple-choice questions, and detailed explanations to enhance your understanding of Kubernetes Cloud Native concepts. Ace your exam!

Multiple Choice

In Kubernetes, what does an 'Ingress' rule in a NetworkPolicy define?

Explanation:
Inbound traffic to pods is controlled by an ingress rule in a NetworkPolicy. It specifies which sources are allowed to connect to the selected pods and on which ports and protocols. This is how you implement access control and micro-segmentation: you can permit traffic from specific namespaces, pods, or IP blocks, and restrict it to certain ports. Ingress is about traffic entering the pods, while egress handles outbound traffic. Scheduling is unrelated, and the ports a container exposes come from the container spec, not the policy itself—though a policy can restrict access to those ports. When a pod is selected by a NetworkPolicy, only traffic allowed by its ingress rules is permitted.

Inbound traffic to pods is controlled by an ingress rule in a NetworkPolicy. It specifies which sources are allowed to connect to the selected pods and on which ports and protocols. This is how you implement access control and micro-segmentation: you can permit traffic from specific namespaces, pods, or IP blocks, and restrict it to certain ports. Ingress is about traffic entering the pods, while egress handles outbound traffic. Scheduling is unrelated, and the ports a container exposes come from the container spec, not the policy itself—though a policy can restrict access to those ports. When a pod is selected by a NetworkPolicy, only traffic allowed by its ingress rules is permitted.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy