Network Policy does not block block traffic for OpenShift Routers
Issue
After deploying Network Policy objects to block IP addresses from access to the OpenShift *.apps Routes matching the following:
name: block-ip
namespace: openshift-ingress
spec:
ingress:
- from:
- ipBlock:
cidr: 0.0.0.0/0
except:
- 100.0.0.1/32. # Example
podSelector: {}
policyTypes:
- Ingress
The Network Policy is not enforced and the IP addresses can still access the Routes provided by the Router.
Environment
- OpenShift Container Platform
- 4.X
- Container Network Interface Plugin (CNI)
- OpenShift SDN
- OVN Kubernetes
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.