kubernetes-yaml/learn/learn-kubernetes-master/kiamol/ch16/apod/update/networkpolicy-api.yaml

17 lines
276 B
YAML

apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: apod-api
labels:
kiamol: ch16
spec:
podSelector:
matchLabels:
app: apod-api
ingress:
- from:
- podSelector:
matchLabels:
app: apod-web
ports:
- port: api