Setting environment variable in DeploymentConfig to status.podIP only works intermittently

Solution Unverified - Updated -

Issue

When setting an environment variable inside DeploymentConfig to equal the status.podIP (like below), sometimes the environment variable is not set after deployment:

# oc get dc test -o yaml | grep -A 6 containers
      containers:
      - env:
        - name: TEST_APP_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP

Environment

  • Red Hat OpenShift Container Platform 3.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.