NetworkPolicy

This commit is contained in:
Raiko Oll
2026-02-17 14:56:24 +02:00
parent 3d6b022cad
commit 1384b3ab50

View File

@@ -1,4 +1,3 @@
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
@@ -13,6 +12,7 @@ spec:
policyTypes:
- Ingress
ingress:
# App -> Redis
- from:
- podSelector:
matchLabels:
@@ -20,6 +20,16 @@ spec:
ports:
- protocol: TCP
port: 6379
# Prom -> Redis
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: monitoring
ports:
- protocol: TCP
port: 6379
---
apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
@@ -92,3 +102,4 @@ spec:
- protocol: TCP
port: 8000