apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: your-app-name
    tier: backend
    deployedBy: deploy-node-app
  name: your-app-name
spec:
  minReadySeconds: 5
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: your-app-name
      tier: backend
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: your-app-name
        tier: backend
        deployedBy: deploy-node-app
    spec:
      containers:
        - image: your-app-image
          imagePullPolicy: Always
          name: your-app-name
          env:
            - name: GET_HOSTS_FROM
              value: dns
          ports:
            - containerPort: 4000
              name: http
              protocol: TCP
          resources:
            limits:
              cpu: 150m
              memory: 128Mi
            requests:
              cpu: 3m
              memory: 64Mi
      restartPolicy: Always
      terminationGracePeriodSeconds: 30
