Roshan Ranasinghe:
Hi Guys : In a Network Policy , I want to limit access ONLY the pods in between Dev and Prod (has a label purpose=prod ) namespaces in a given port 8001… Could you please verify the bellow ?
apiVersion: http://networking.k8s.io/v1|networking.k8s.io/v1
kind: NetworkPolicymetadata: name: my-pol
namespace: dev
spec:
podSelector: {}
policyTypes:
- Ingress
ingress: - from:
- namespaceSelector:
matchLabels:
purpose: prod - podSelector: {}
ports: - protocol: TCP
port: 8001
- namespaceSelector: