32 lines
662 B
YAML
32 lines
662 B
YAML
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: security-lab-default-deny-ingress
|
|
namespace: security-lab
|
|
spec:
|
|
podSelector: {}
|
|
policyTypes:
|
|
- Ingress
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: NetworkPolicy
|
|
metadata:
|
|
name: security-lab-allow-port-forward
|
|
namespace: security-lab
|
|
spec:
|
|
podSelector:
|
|
matchLabels:
|
|
homelab.dev/security-lab-app: "true"
|
|
policyTypes:
|
|
- Ingress
|
|
ingress:
|
|
- from:
|
|
- namespaceSelector:
|
|
matchLabels:
|
|
kubernetes.io/metadata.name: kube-system
|
|
ports:
|
|
- protocol: TCP
|
|
port: 3000
|
|
- protocol: TCP
|
|
port: 8080
|