From 3c7d5fc9c618e0116d5fd813cd079da41e00d4b3 Mon Sep 17 00:00:00 2001 From: Eric Paris Date: Thu, 22 Sep 2016 12:52:39 -0400 Subject: [PATCH] Update networkpolicies.md --- docs/user-guide/networkpolicies.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/user-guide/networkpolicies.md b/docs/user-guide/networkpolicies.md index 22c2ed2952..0afe1791b2 100644 --- a/docs/user-guide/networkpolicies.md +++ b/docs/user-guide/networkpolicies.md @@ -84,3 +84,9 @@ __spec__: `NetworkPolicy` [spec](https://github.com/kubernetes/kubernetes/tree/{ __podSelector__: Each `NetworkPolicy` includes a `podSelector` which selects the grouping of pods to which the `ingress` rules in the policy apply. __ingress__: Each `NetworkPolicy` includes a list of whitelist `ingress` rules. Each rule allows traffic which matches both the `from` and `ports` sections. + +In plain language, this example NetworkPolicy: + +1. applies to all pods in the current (???) namespace with the label "role=db" +2. allows tcp/6379 ingress traffic to the "role=db" pods from any pod in the current namespace with the label "role=frontend" (due to the podSelector list element) +3. allows tcp/6379 ingress traffic to the "role=db" pods from any pod in the namespace "myproject" (due to the namespaceSelector list element)