Lab Exercise A.3: Practicing Skills. Exercises 27, 28, and 29
I have questions about exercises 27, 28, and 29. I’m not clear on what the instructions are asking, so I’m outlining my doubts.
Exercise 27 says to create a NetworkPolicy that blocks all traffic (I understand both ingress and egress) only for the pods of the deployment from exercise 25—let’s assume it’s called “sample”—and then verify that it can’t be accessed.
But exercise 28 asks us to create an nginx pod in the Running state (not a deployment) and says we must make sure traffic can reach the deployment (“sample?”) from this pod. How are we supposed to reach it if it’s blocked by the policy in exercise 27?
It’s true that exercise 29 explicitly asks us to update the NetworkPolicy so that access to port 80 is allowed and then verify it.
So, does exercise 28 expect us to reach the sample deployment, or only to reach the nginx pod—thus confirming that we’ve blocked traffic only for the pods in the sample deployment and not for the rest?
Thank you in advance.
Best regards.
Comments
-
Hi @alvarobrac,
This is an attempt to simplify the approach to resolving these practice scenarios:
Step 25 - create a deployment that launches an nginx application - let's name it sample25.
Step 26 - expose the sample25 deployment through a LoadBalancer service type, and test for a successful connection.
Step 27 - the NetworkPolicy should block traffic only to pods of the sample25 deployment. Keyword is "to" - this helps you determine whether to block "egress" or "ingress" traffic. Also, keep in mind that a generic policy would block access to all applications, while a targeted policy would only restrict access to a specific (targeted) application.
Step 28 - Because of the slight ambiguity of the task, a naked pod or a deployment should be acceptable launching methods for the second nginx application - let's name it sample28. If the NetworkPolicy in step 27 was set correctly (and only blocks traffic to sample25), it should not impact traffic to sample28, therefore the access attempt to sample28 should succeed.
Step 29 - This step dives deeper into the granularity of the NetworkPolicy controls. How do you modify the policy to only allow traffic "to" port 80?
Hope this is of some help

Regards,
-Chris0 -
Thank you very much, everything is now clear!
0
Categories
- All Categories
- 177 LFX Mentorship
- 177 LFX Mentorship: Linux Kernel
- 750 Linux Foundation IT Professional Programs
- 373 Cloud Engineer IT Professional Program
- 169 Advanced Cloud Engineer IT Professional Program
- 74 DevOps IT Professional Program - Discontinued
- 4 DevOps & GitOps IT Professional Program
- 99 Cloud Native Developer IT Professional Program
- 7.6K Training Courses & Learning Paths
- 1 AI & ML Training
- 1 Blockchain & Decentralized Identity Training
- 3 Cloud & Containers Training
- 1 Cybersecurity Training
- 2 DevOps & Site-Reliability Training
- 1 Linux Kernel Development Training
- 1 Networking Training
- 1 Open Source Best Practice Training
- 1 System Administration Training
- 1 System Engineering Training
- 1 Web & Application Development Training
- 792 Hardware
- 202 Drivers
- 68 I/O Devices
- 37 Monitors
- 95 Multimedia
- 173 Networking
- 91 Printers & Scanners
- 87 Storage
- 769 Linux Distributions
- 81 Debian
- 68 Fedora
- 22 Linux Mint
- 13 Mageia
- 24 openSUSE
- 150 Red Hat Enterprise
- 31 Slackware
- 13 SUSE Enterprise
- 356 Ubuntu
- 465 Linux System Administration
- 31 Cloud Computing
- 73 Command Line/Scripting
- Github systems admin projects
- 98 Linux Security
- 78 Network Management
- 101 System Management
- 46 Web Management
- 106 Mobile Computing
- 18 Android
- 73 Development
- 1.2K New to Linux
- 1K Getting Started with Linux
- 392 Off Topic
- 121 Introductions
- 181 Small Talk
- 29 Study Material
- 955 Programming and Development
- 310 Kernel Development
- 627 Software Development
- 983 Software
- 375 Applications
- 182 Command Line
- 5 Compiling/Installing
- 68 Games
- 317 Installation
- Archived
- 2 LFD140 Class Forum
Upcoming Training
-
August 20, 2018
Kubernetes Administration (LFS458)
-
August 20, 2018
Linux System Administration (LFS301)
-
August 27, 2018
Open Source Virtualization (LFS462)
-
August 27, 2018
Linux Kernel Debugging and Security (LFD440)