apiVersion: apps/v1
kind: Deployment

metadata:
  name: deployment-node-app
  labels:
    something: node-app-cuongnc2
spec:
  strategy:
     type: RollingUpdate
     rollingUpdate:
       maxSurge: 1
       maxUnavailable: 0
  replicas: 1
  selector:
    matchLabels:
      app: node-app-cuongnc2

  template:
    metadata:
      name: node-app-mongo-pod
      labels:
        app: node-app-cuongnc2
    spec:
      containers:
        - name: node-app-nodea
          image: cuongnc2/node-app
          env:
           - name: MONGODB_URI
             value: "mongodb://mongodb-svc:27017/demo"
          ports:
            - containerPort: 3000
