apiVersion: apps/v1
kind: Deployment
metadata:
  name: myapp-deployment
  labels:
    app: myapp
spec:
  selector:
    matchLabels:
      app: myapp
  replicas: 1
  template:
    metadata:
      name: myapp-pod
      labels:
        app: myapp
    spec:
      containers:
      - name: myapp-container
        image: node:alpine
        command: ['node', '/myapp/app.js']
        ports:
        - name: web
          containerPort: 3000
        env:
        - name: PORT
          value: '3000'
        volumeMounts:
        - name: config-volume
          mountPath: /myapp
      volumes:
      - name: config-volume
        configMap:
          name: myapp-configmap
