apiVersion: v1
kind: Pod
metadata:
  name: pod-using-configmap
  namespace: default

spec: 
  # Add the ConfigMap as a volume to the Pod
  volumes:
    # `name` here must match the name
    # specified in the volume mount
    - name: example-configmap-volume
      configMap:
        # `name` here must match the name 
        # specified in the ConfigMap's YAML 
        name: example-configmap
  containers:
    - name: container-configmap
      image: nginx:1.20.0
      # Mount the volume that contains the configuration data 
      # into your container filesystem
      volumeMounts:
        # `name` here must match the name
        # from the volumes section of this pod
        -  mountPath: "/etc/config"
           name: example-configmap-volume
           readOnly: true
           