apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: rest-api
  name: rest-api
  namespace: default
spec:
  replicas: 1
  selector:
    matchLabels:
      app: rest-api
  template:
    metadata:
      labels:
        app: rest-api
    spec:
      containers:
      - image: rest-api
        envFrom:
          - configMapRef:
              name: env-variables
        imagePullPolicy: IfNotPresent
        name: rest-api
      restartPolicy: Always