Network policy recipes
Last updated
Was this helpful?
Last updated
Was this helpful?
NetworkPolicies operate at layer 3 or 4 of OSI model (IP and port level). They are used to control the traffic in(ingress) and out(egress) of pods.
Here are some NetworkPolicies gotcha's
Rules are chained together. NetworkPolicy are additive. If multiple NetworkPolicies are selecting a pod, their union is evaluated and applied to that pod.
🔜 LIMIT egress traffic from an application to some pods
🔜 ALLOW traffic only to Pods in a namespace
Disclaimer: This is not an official Google product.
This repository contains various use cases of Kubernetes and sample YAML files to leverage in your setup. If you ever wondered how to drop/restrict traffic to applications running on Kubernetes, read on.
Easiest way to try out Network Policies is to create a new cluster. Applying Network Policies on your existing cluster can disrupt the networking. At the time of writing, most cloud providers do not provide built-in network policy support.
If you are not familiar with Network Policies at all, I recommend reading my article first.
I really recommend if you want to get a good understanding of this feature. It will help you understand this repo better.
(a.k.a. LIMIT access to the current namespace)
Created by Ahmet Alp Balkan ().
Copyright 2017, Google Inc. Distributed under Apache License Version 2.0 ,see for details.