apiVersion: v1
kind: Pod
metadata: 
  name: app-with-configmap
spec:
  containers:
  - name: nginx
    image: nginx
    command: [ "/bin/sh", "-c", "echo $(DATA_STRING) > $(DATA_PATH) ; sleep 3600" ]
    env:
    - name: DATA_STRING
      valueFrom:
        configMapKeyRef:
          name: config
          key: STRING
          optional: true
    - name: DATA_PATH
      valueFrom:
        configMapKeyRef:
          name: config
          key: PATH
          optional: true
  restartPolicy: Never

