Kubernetes, DevOps, Cloud Computing, Software Development, Programming.
in the same namespace with a specific label: apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: allow-from-same-namespace spec: podSelector: matchLabels: app: my-app ingress: - from: - podSelector: matchLabels: app: my-app This policy ensures that only pods labeled app: my-app