fannullone

Flight Engineer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-16-2024
10:26 AM
- 660 Views
do280 ch4 guided exercise: Configure Network Policies - step 12 solution not correct?
The requirement is Create a network policy that allows traffic to the hello pod via the exposed route.
So this is ONLY for the hellp pod, but the solution provided grant access to all pods:
spec:
podSelector: {}
I did it differently, pls comment...
[student@workstation ~]$ oc get networkpolicies/allow-from-openshift-ingress -ojsonpath='{.spec.podSelector}{"\n"}'
{"matchLabels":{"deployment":"hello"}}
1 Reply
MalborBoss

Flight Engineer
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2024
11:23 AM
- 497 Views
Exercise didn't specify that you need to limit the policy just to pods with some labels, therefore solution was provided as it was provided. Otherwise I would say that your solution is correct. But just to be safe - on exam when they don't tell you to limit the policy only to some pods, I wouldn't do it.
Join the discussion
You must log in to join this conversation.