Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
17 lines (16 sloc) 414 Bytes
# https://kubernetes.io/blog/2017/10/enforcing-network-policies-in-kubernetes/
# nginx pods only allow ingress traffic from foo pods
# https://cheatsheet.dennyzhang.com/kubernetes-yaml-templates
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
name: access-nginx
spec:
podSelector:
matchLabels:
app: nginx
ingress:
- from:
- podSelector:
matchLabels:
app: foo