Exam CKAD Topic 3 Question 127 Discussion
Actual exam question for Linux Foundation's CKAD exam
Question #: 127
Topic #: 3
Question #: 127
Topic #: 3
You have a Deployment running a microservice that is responsible for processing user data To ensure the security of this data, you need to implement a NetworkPolicy that restricts network traffic to and from the microservice's pods.
Suggested Answer:
See the solution below with Step by Step Explanation.
Explanation:
Solution (Step by Step) :
1. Create a NetworkP01icy:
- Create a NetworkPolicy YAML file to define the traffic rules:

2. Apply the NetworkPolicy: - Apply tne NetworkPoliCY configuration to your Kubernetes cluster: basn kubectl apply -f restrict-microservice-traffic_yaml 3. Test the NetworkPoIicy: - Create a pod in a different namespace or on a different node. - Attempt to connect to the microservice pod from the new pod. - Verity that the connection is blocked as per the defined NetworkPolicy rules.
Explanation:
Solution (Step by Step) :
1. Create a NetworkP01icy:
- Create a NetworkPolicy YAML file to define the traffic rules:

2. Apply the NetworkPolicy: - Apply tne NetworkPoliCY configuration to your Kubernetes cluster: basn kubectl apply -f restrict-microservice-traffic_yaml 3. Test the NetworkPoIicy: - Create a pod in a different namespace or on a different node. - Attempt to connect to the microservice pod from the new pod. - Verity that the connection is blocked as per the defined NetworkPolicy rules.
by Mark at Apr 01, 2026, 03:52 AM
0
0
0
10
Comments
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Report Comment
Commenting
You can sign-up / login (it's free).