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

Study for the Kubernetes Cloud Native Associate (KCNA) Certification 1 Test. Master the core concepts of Kubernetes with multiple-choice questions and detailed explanations. Prepare and boost your confidence for the KCNA certification 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