NetworkPolicy causes pods to enter CrashLoopBackOff or Failed states

Solution Verified - Updated -

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.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content