apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: my-network-policy
spec:
endpointSelector:
matchLabels:
app: my-app
ingress:
- fromEndpoints:
- matchLabels:
app: prometheus
toPorts:
- ports:
- port: metrics
egress:
- toFQDNs:
- matchName: https://oopa.gangnam.style
toPorts:
- ports:
- port: 443
- toEntities:
- kubeapi
toPorts:
- ports:
- port: 443