apiVersion: v1
kind: Pod
metadata:
  name: configmap-test-pod
spec:
  containers:
    - name: configmap-container
      image: k8s.gcr.io/busybox
      command: ['/bin/sh', '-c', 'ls /etc/appconfig']  # list files in the volume mount.
      volumeMounts:
        - name: config-volume
          mountPath: /etc/appconfig
  volumes:
    - name: config-volume
      configMap:
        name: full-file-map  # Provide the name of the ConfigMap containing the files you want 
                             # to add to the container
  restartPolicy: Never

# kubectl --namespace configmap-test create -f mount-configmap-as-volume.yaml
# kubectl --namespace configmap-test logs -f configmap-test-pod
