Update networkpolicies.md

reviewable/pr1285/r3
Eric Paris 2016-09-22 12:55:09 -04:00 committed by GitHub
parent 3c7d5fc9c6
commit c31b8d608b
1 changed files with 2 additions and 1 deletions

View File

@ -56,6 +56,7 @@ A minimal `NetworkPolicy` might look like this:
```yaml ```yaml
apiVersion: extensions/v1beta1 apiVersion: extensions/v1beta1
kind: NetworkPolicy kind: NetworkPolicy
namespace: default
metadata: metadata:
name: test-network-policy name: test-network-policy
spec: spec:
@ -87,6 +88,6 @@ __ingress__: Each `NetworkPolicy` includes a list of whitelist `ingress` rules.
In plain language, this example NetworkPolicy: In plain language, this example NetworkPolicy:
1. applies to all pods in the current (???) namespace with the label "role=db" 1. applies to all pods in the default 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) 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) 3. allows tcp/6379 ingress traffic to the "role=db" pods from any pod in the namespace "myproject" (due to the namespaceSelector list element)