In kubernetes we can easily expose certain params and values through environment variables. Examples of these can be the node IP, the container uid, etc.
Example
- name: POD_ID
valueFrom:
fieldRef:
fieldPath: metadata.uid
However, I was wondering if there is a way to list the possible references that can be included in the pod. Either in the form of an API reference or dynamically on a pod.
Figured it out myself, you can only reference the variables that are also exposed if you kubectl edit pod <podname>
a pod.