apiVersion: apps/v1
kind: Deployment
metadata:
  name: k8s-challenge
  labels:
    app: k8s-challenge
spec:
  replicas: 3
  selector:
    matchLabels:
      app: k8s-challenge
  template:
    metadata:
      labels:
        app: k8s-challenge
    spec:
      containers:
      - name: k8s-challenge
        image: k8s-challenge:v1
        ports:
          - containerPort: 4000
        env:
        - name: NAME
          valueFrom:
            configMapKeyRef:
              name: user-name
              key: user.name
