<p>I have had some success getting the name of the pod into my container for logging purposes,</p>
<pre><code>          env:
            - name: ID_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
</code></pre>
<p>however I would like to extend that by logging the deployment and replica sets. Is there a way to pass these values into the pod?</p>
<p>Based on some observation, the pod name appears to just be an extension of the set name, which is an extension of the deployment name. Is there a way to parse that info from the name?</p>

<p>There's no way to get the <code>ownerReference</code> inside the Pod using the Downward APIs: this is the list of the unique items supported.</p>
<p><a href="https://github.com/kubernetes/kubernetes/blob/cea1d4e20b4a7886d8ff65f34c6d4f95efcb4742/pkg/apis/core/pods/helpers.go#L61-L100" rel="nofollow noreferrer">https://github.com/kubernetes/kubernetes/blob/cea1d4e20b4a7886d8ff65f34c6d4f95efcb4742/pkg/apis/core/pods/helpers.go#L61-L100</a></p>
