apiVersion: apps/v1
kind: Deployment
metadata:
  name: node-deployment
spec:
  replicas: 2
  selector:
    matchLabels:
      app: node
  template:
    metadata:
      labels:
        app: node
    spec:
      containers:
      - name: node
        image: node:13.10.1-alpine
        command: ["node", "/workspace/index.js"]
        env:
          - name: PORT
            value: "80"
        volumeMounts:
          - name: config-volume
            mountPath: /workspace/index.js
            subPath: index.js
      volumes:
        - name: config-volume
          configMap:
            name: node-script
