Skip to content

Commit 4794d61

Browse files
authored
Create net_pol1.yaml
1 parent af86230 commit 4794d61

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
apiVersion: networking.k8s.io/v1
2+
kind: NetworkPolicy
3+
metadata:
4+
name: allow-172-17
5+
namespace: namespaceB
6+
spec:
7+
podSelector:
8+
matchLabels:
9+
app: frontend
10+
policyTypes:
11+
- Ingress
12+
ingress:
13+
- from:
14+
- ipBlock:
15+
cidr: 172.17.0.0/16
16+
except:
17+
- 172.17.1.0/24
18+
- namespaceSelector:
19+
matchLabels:
20+
myspace: namespaceA
21+
- podSelector:
22+
matchLabels:
23+
app: frontend

0 commit comments

Comments
 (0)