sec: NetworkPolicy egress restrito (intra-ns + DNS)
This commit is contained in:
@@ -52,4 +52,12 @@ spec:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: kube-system
|
||||
egress:
|
||||
- {}
|
||||
- to: # intra-namespace (postgres, keycloak)
|
||||
- podSelector: {}
|
||||
- to: # DNS (CoreDNS em kube-system)
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: kube-system
|
||||
ports:
|
||||
- { protocol: UDP, port: 53 }
|
||||
- { protocol: TCP, port: 53 }
|
||||
|
||||
@@ -56,4 +56,12 @@ spec:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: kube-system # Traefik (ingress)
|
||||
egress:
|
||||
- {} # egress liberado (DNS, Postgres, internet)
|
||||
- to: # intra-namespace (postgres, keycloak)
|
||||
- podSelector: {}
|
||||
- to: # DNS (CoreDNS em kube-system)
|
||||
- namespaceSelector:
|
||||
matchLabels:
|
||||
kubernetes.io/metadata.name: kube-system
|
||||
ports:
|
||||
- { protocol: UDP, port: 53 }
|
||||
- { protocol: TCP, port: 53 }
|
||||
|
||||
Reference in New Issue
Block a user