apiVersion: v1
kind: Pod
metadata:
name: dapi-env-test-pod
spec:
containers:
- name: env-test-container
image: gcr.io/google_containers/busybox
command: [ "/bin/sh", "-c", "env" ]
env:
- name: MY_POD_NAMe
valueFrom:
fieldRef:
fieldPath: metadata.name
- name: MY_POD_NAMeSPACe
valueFrom:
fieldRef:
fieldPath: metadata.namespace
restartPolicy: Never