Recall & Review
beginner
What are ingress rules in Kubernetes?
Ingress rules define the incoming network traffic allowed to reach pods or services inside a Kubernetes cluster.
Click to reveal answer
beginner
What do egress rules control in Kubernetes?
Egress rules control the outgoing network traffic from pods to destinations outside or inside the cluster.
Click to reveal answer
intermediate
How are ingress and egress rules typically enforced in Kubernetes?
They are enforced using Network Policies that specify allowed traffic directions, ports, and sources or destinations.
Click to reveal answer
intermediate
Give an example of an ingress rule in a Kubernetes NetworkPolicy.
An ingress rule might allow traffic on port 80 from pods with a specific label, e.g., allowing HTTP traffic only from frontend pods.
Click to reveal answer
beginner
Why are ingress and egress rules important in Kubernetes?
They help secure the cluster by controlling which traffic can enter or leave pods, reducing attack surfaces and preventing unauthorized access.
Click to reveal answer
What does an ingress rule in Kubernetes control?
✗ Incorrect
Ingress rules control the incoming network traffic allowed to reach pods or services.
Which Kubernetes object is used to define ingress and egress rules?
✗ Incorrect
NetworkPolicy objects define ingress and egress rules for pods.
What happens if no ingress rules are defined in a NetworkPolicy?
✗ Incorrect
If a NetworkPolicy selects a pod but has no ingress rules, all incoming traffic to that pod is denied.
Egress rules in Kubernetes NetworkPolicy specify:
✗ Incorrect
Egress rules specify which destinations and ports pods can send traffic to.
Which label selector is used in NetworkPolicy to specify pods affected by the policy?
✗ Incorrect
podSelector defines which pods the NetworkPolicy applies to.
Explain the difference between ingress and egress rules in Kubernetes NetworkPolicies.
Think about traffic direction: entering vs leaving pods.
You got /4 concepts.
Describe how you would write a simple ingress rule to allow HTTP traffic from a specific set of pods.
Focus on specifying source pods and port in ingress.
You got /4 concepts.