k8s-mgmt-pod/k8s/networkpolicy.yaml
Michael Trip 5584dc1f29
All checks were successful
Build k8s-mgmt-pod image / Build & Push (push) Successful in 1m35s
Update SSH port from 22 to 2222 in Dockerfile, entrypoint, and Kubernetes configurations
2026-06-23 15:48:15 +02:00

24 lines
633 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: 2222
- protocol: TCP
port: 3000