# Usefull for reading dynamic variables from pod -o yaml
apiVersion: v1
kind: Pod
metadata:
  name: dapi-envars-fieldref
spec:
  containers:
    - name: test-container
      image: nginx:alpine
      env:
        - name: MY_NODE_NAME
          valueFrom:
            fieldRef:
              fieldPath: spec.nodeName # Field inside = kubectl get pods <pod-name> -o yaml
        - name: MY_POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: medata.name
        - name: MY_POD_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
