All checks were successful
Build k8s-mgmt-pod image / Build & Push (push) Successful in 2m21s
24 lines
631 B
YAML
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
|