k8s-mgmt-pod/k8s/networkpolicy.yaml
Michael Trip 4dbcde381f
All checks were successful
Build k8s-mgmt-pod image / Build & Push (push) Successful in 2m21s
initial commit
2026-06-23 15:06:17 +02:00

24 lines
631 B
YAML

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: k8s-mgmt-pod
spec:
podSelector:
matchLabels:
app.kubernetes.io/name: k8s-mgmt-pod
policyTypes:
- Ingress
ingress:
# Starting point only. Adjust these selectors to the namespaces or pods that should reach the bastion.
- from:
- namespaceSelector:
matchLabels:
kubernetes.io/metadata.name: k8s-mgmt-pod
- namespaceSelector:
matchLabels:
k8s-mgmt-pod-access: "true"
ports:
- protocol: TCP
port: 22
- protocol: TCP
port: 3000