Example recipes for Kubernetes Network Policies that you can just copy paste
Switch branches/tags
Nothing to show
Clone or download
ammaristotle and ahmetb Update 10-allowing-traffic-with-multiple-selectors.md (#40)
Fixes indentation for pod selectors. Teşekkür ederim for this amazing repo!
Latest commit 2268418 Oct 25, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github add issue template Sep 26, 2018
img Update 4.gif Aug 8, 2017
00-create-cluster.md Update 00-create-cluster.md Mar 29, 2018
01-deny-all-traffic-to-an-application.md Missing language specs in fenced code blocks (#29) Jul 23, 2018
02-limit-traffic-to-an-application.md Missing language specs in fenced code blocks (#29) Jul 23, 2018
02a-allow-all-traffic-to-an-application.md Missing language specs in fenced code blocks (#29) Jul 23, 2018
03-deny-all-non-whitelisted-traffic-in-the-namespace.md Add default-deny-all-egress Dec 19, 2017
04-deny-traffic-from-other-namespaces.md Missing language specs in fenced code blocks (#29) Jul 23, 2018
05-allow-traffic-from-all-namespaces.md Fixed invalid kubectl apply command (#32) Aug 6, 2018
06-allow-traffic-from-a-namespace.md Missing language specs in fenced code blocks (#29) Jul 23, 2018
07-allow-traffic-from-some-pods-in-another-namespace.md Update 07-allow-traffic-from-some-pods-in-another-namespace.md Aug 1, 2018
08-allow-external-traffic.md Missing language specs in fenced code blocks (#29) Jul 23, 2018
09-allow-traffic-only-to-a-port.md Update 09-allow-traffic-only-to-a-port.md (#39) Oct 22, 2018
10-allowing-traffic-with-multiple-selectors.md Update 10-allowing-traffic-with-multiple-selectors.md (#40) Oct 25, 2018
11-deny-egress-traffic-from-an-application.md Missing language specs in fenced code blocks (#29) Jul 23, 2018
12-deny-all-non-whitelisted-traffic-from-the-namespace.md Add default-deny-all-egress Dec 19, 2017
14-deny-external-egress-traffic.md Missing language specs in fenced code blocks (#29) Jul 23, 2018
CONTRIBUTING.md Create CONTRIBUTING.md Aug 4, 2017
LICENSE Update LICENSE Jul 31, 2017
README.md Fix broken links in README.md (#20) May 1, 2018

README.md

You can get stuff like this You can get stuff like this with Network Policies...

Kubernetes Network Policy Recipes

This repository contains various use cases of Kubernetes Network Policies 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 Engine 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 Networking article first.

Before you begin

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

Basics

Namespaces

Serving External Traffic

Advanced

Controlling Outbound (Egress) Traffic 🔥🆕🔥


Author

Created by Ahmet Alp Balkan (@ahmetb).

Copyright 2017, Google Inc. Distributed under Apache License Version 2.0 ,see LICENSE for details.

Disclaimer: This is not an official Google product.

Stargazers over time