Deep Dive into Network Policy

Welcome! This tutorial helps you get started with Kubernetes NetworkPolicy.

What is Kubernetes NetworkPolicy?

NetworkPolicy is a standardized Kubernetes object to control the allowed network traffic patterns between Kubernetes pods and namespaces as well as any traffic entering or leaving the cluster. However, Kubernetes itself does not provide an implementation of NetworkPolicy, it is typically provided by the CNI plugin. If no NetworkPolicy is loaded, all communication is allowed which is clearly violating least-privilege and zero-trust security privileges. For more information on the concept, see Network Policies in the Kubernetes documentation.

Read more
Part 2 icon

Part 2 | Securing access in and out of your clustercoming soon

Part 3 icon

Part 3 | Special cases: Host-networking, Loadbalancers, Health-checkingcoming soon

Part 4 icon

Part 4 | How to troubleshoot NetworkPolicy and monitor Compliancecoming soon

Policy Editor

Try Network Policy Editor

Interactive & tutorial-based policy creation

Amazing visualizations

Security score

Easy sharing with others via GitHub

Auto-generate from network flow logs

NetworkPolicy & CiliumNetworkPolicy


Resources


Links

Kubernetes Network Policies

Kubernetes Network Policy overview from Kubernetes documentation

Kubernetes Network Plugins

Kubernetes uses a plugin model for networking, using the CNI to manage network resources on a cluster including network policies

Kubernetes Concepts

Learn about the parts of the Kubernetes system and the abstractions Kubernetes uses to represent a cluster

What's new

March 30, 2021
policy repo

Network Policy Repo

A place to find and contribute useful resources and example policies.

Go to repo
March 03, 2021
video

Demystifying Network Policy

In this video tutorial, Thomas Graf walks us through step by step creating various common network policies and understanding their impacts.

Watch tutorial
February 10, 2021
blog

5 Common Network Policy Mistakes

Let’s explore five common gotchas we see trip up those working with Network Policy, both newbies and sometimes (gulp!) those of us who have been doing this for a while. At the end of each mistake, you’ll find a link to a short (3-5 minute) tutorial in

Read more
NetworkPolicy.io is a community resource created and provided by the Cilium community.