apiVersion: v1
kind: Pod
metadata:
  name: demo-configmap-usage
spec:
  containers:
  - name: demo-configmap-pod
    image: redis
    env:
      - name: SERVICE_NAME
        valueFrom:
          configMapKeyRef:
            name: demo-configmap
            key: servicename
  restartPolicy: Never