NetworkPolicy causes pods to enter CrashLoopBackOff or Failed states
Issue
- I have implemented what I believe to be the correct policy configuration for NetworkPolicy which is blocking horizontal traffic and allowing egress traffic
- However, it is not allowing traffic in via the ingress routers. This is also causing healthchecks to fail intermittently and the pods to crash.
- After setting up a Deny-All NetworkPolicy, pods keep crashing
apiVersion: extensions/v1beta1
kind: NetworkPolicy
metadata:
name: deny-all
spec:
ingress:
- from:
- namespaceSelector:
matchLabels:
project: default
- podSelector:
matchLabels:
type: ingress
Environment
- Red Hat OpenShift Container Platform
- 3.7
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.