NetworkPolicy
This commit is contained in:
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: NetworkPolicy
|
kind: NetworkPolicy
|
||||||
@@ -11,15 +10,26 @@ spec:
|
|||||||
app: memelord-raiko-redis
|
app: memelord-raiko-redis
|
||||||
app.kubernetes.io/name: dragonfly
|
app.kubernetes.io/name: dragonfly
|
||||||
policyTypes:
|
policyTypes:
|
||||||
- Ingress
|
- Ingress
|
||||||
ingress:
|
ingress:
|
||||||
- from:
|
# App -> Redis
|
||||||
- podSelector:
|
- from:
|
||||||
matchLabels:
|
- podSelector:
|
||||||
app: memelord
|
matchLabels:
|
||||||
ports:
|
app: memelord
|
||||||
- protocol: TCP
|
ports:
|
||||||
port: 6379
|
- protocol: TCP
|
||||||
|
port: 6379
|
||||||
|
|
||||||
|
# Prom -> Redis
|
||||||
|
- from:
|
||||||
|
- namespaceSelector:
|
||||||
|
matchLabels:
|
||||||
|
kubernetes.io/metadata.name: monitoring
|
||||||
|
ports:
|
||||||
|
- protocol: TCP
|
||||||
|
port: 6379
|
||||||
|
|
||||||
---
|
---
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: NetworkPolicy
|
kind: NetworkPolicy
|
||||||
@@ -80,15 +90,16 @@ metadata:
|
|||||||
spec:
|
spec:
|
||||||
podSelector:
|
podSelector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: memelord
|
app: memelord
|
||||||
policyTypes:
|
policyTypes:
|
||||||
- Ingress
|
- Ingress
|
||||||
ingress:
|
ingress:
|
||||||
- from:
|
- from:
|
||||||
- namespaceSelector:
|
- namespaceSelector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
kubernetes.io/metadata.name: traefik
|
kubernetes.io/metadata.name: traefik
|
||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 8000
|
port: 8000
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user