apiVersion: v1
kind: Pod
metadata:
  name: optional-secret-env-pod
spec:
  containers:
    - name: mycontainer
      image: redis
      env:
        - name: SUPER_SECRET
          valueFrom:
            secretKeyRef:
              name: mysupersecret
              key: supername
              # optional will make the pod to start even if the secret doesn't exist
              # only available in 1.6
              #optional: true
  restartPolicy: Never
