From the course: Certified Kubernetes Administrator (CKA) Cert Prep (2024)

Unlock this course with a free trial

Join today to access over 24,900 courses taught by industry experts.

Lesson 9 lab: Using network policies

Lesson 9 lab: Using network policies

- All right, we are now at the end of this lesson. Let's do a lab. In this lab you are going to use network policies. Run a web server with the name lab9server in the namespace restricted using the Nginx image and ensure it's exposed by a service. From the default namespace, start two pods, sleepybox1 and sleepybox2, each based on the Busybox image, using the sleep 3600 command as their default command. And create a network policy that limits ingress traffic to restricted in such a way that only the sleepybox1 pod from the default namespace has access and all other access is forbidden. Good luck.

Contents