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, 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