You can make sure that the replication contoller/replica set yaml files add the pod's IP as an env variable by adding the configuration block below:
env:
- name: MY_POD_NAME
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: MY_POD_NAMESPACE
valueFrom:
fieldRef:
fieldPath: metadata.namespace
- name: MY_POD_IP
valueFrom:
fieldRef:
fieldPath: status.podIP
Apply the new configuration to the Replication Controller or replica set and then check:
echo $MY_POD_IP