hands-on labControl Kubernetes Network Traffic With Network Policies
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.
Lab steps
Connecting to the Kubernetes Cluster
Configuring Kubernetes Network Policies
Lab description

Kubernetes network policies allow you to control network access to and from Pods. Network policies are namespaced resources and allow you to specify ingress (allowed incoming traffic) and egress (allowed outgoing traffic) rules. You define rules that select what Pods, namespaces, or IP address ranges the policy applies to.

This lab is valuable to anyone working with Kubernetes, but the content has been prepared considering topics described in the Certified Kubernetes Application Developer (CKAD) Exam Curriculum. Completion of the lab will help you get hands-on experience, which is essential for passing the CKAD exam.

Learning Objectives

  • Configure network policies to control Pod communication

Intended Audience

  • Application developers and DevOps engineers deploying applications in containers and using or considering Kubernetes
  • This lab is recommended for Certified Kubernetes Application Developer (CKAD) examinees


  • Knowledge of Kubernetes Pod Design (Pods, Deployments, Services, Jobs)
  • Experience with kubectl
  • Familiarity with Kubernetes Pod network architecture

You can complete the Kubernetes Pod Design for Application Developers lab series and the Networking lesson in the Kubernetes Patterns for Application Developers to satisfy the prerequisites.


November 17th, 2022 - Updated the instructions and screenshots to reflect the latest UI

September 6th, 2022 - Updated to run Kubernetes 1.24

April 28th, 2022 - Updated to run Kubernetes 1.21

Environment before
environment before preview
Environment after
environment after preview
About the author
Logan Rakai
Lead Content Developer - Labs
Learning Paths

Logan has been involved in software development and research since 2007 and has been in the cloud since 2012. He is an AWS Certified DevOps Engineer - Professional, AWS Certified Solutions Architect - Professional, Microsoft Certified Azure Solutions Architect Expert, MCSE: Cloud Platform and Infrastructure, Google Cloud Certified Associate Cloud Engineer, Certified Kubernetes Security Specialist (CKS), Certified Kubernetes Administrator (CKA), Certified Kubernetes Application Developer (CKAD), and Certified OpenStack Administrator (COA). He earned his Ph.D. studying design automation and enjoys all things tech.

Covered topics