Network policy recipes

Network policy recipes

https://github.com/ahmetb/kubernetes-network-policy-recipesarrow-up-right

You can get stuff like this with Network Policies...arrow-up-right

This repository contains various use cases of Kubernetes Network Policiesarrow-up-right 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 Google Kubernetes Enginearrow-up-right 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 Securing Kubernetes Cluster Networkingarrow-up-right article first.

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.

I really recommend watching my KubeCon talk on Network Policiesarrow-up-right if you want to get a good understanding of this feature. It will help you understand this repo better.

Created by Ahmet Alp Balkan (@ahmetbarrow-up-right).

Copyright 2017, Google Inc. Distributed under Apache License Version 2.0 ,see LICENSEarrow-up-right for details.

Disclaimer: This is not an official Google product.

https://camo.githubusercontent.com/69c7b86ee4684b209e70193637d2b621d193913c755cd064ce7b6d00009f0fc1/68747470733a2f2f737461726368617274732e6865726f6b756170702e636f6d2f61686d6574622f6b756265726e657465732d6e6574776f726b706f6c6963792d7475746f7269616c2e737667arrow-up-right

Last updated