apiVersion: apps/v1
kind: Deployment
metadata:
  name: nodejs-deployment
  labels:
    app: nodejs
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nodejs
  template:
    metadata:
      labels:
        app: nodejs
    spec:
      containers:
      - name: nodejs
        image: node:8
        command: ['/bin/sh', '-c']
        args: ['cd /home && git clone https://github.com/madhuhaasnannaka/simple-nodejs-k8s.git demo && cd demo/sample-app && npm install && node server.js']        
        ports:
        - containerPort: 3000
          name: http-server
