apiVersion: networking.k8s.io/v1
kind: NetworkPolicy
metadata:
name: named-port-ingress-rule
namespace: test
spec:
ingress:
- ports:
- port: serve-80
protocol: TCP
podSelector:
matchLabels:
app: server
policyTypes:
- Ingress