apiVersion: apps/v1
kind: Deployment
metadata:
  name: rest-example
spec:
  replicas: 1
  selector:
     matchLabels:
         app: rest-example
         role: master
         tier: backend  
  template:
    metadata:
      labels: 
        app: rest-example
        role: master
        tier: backend
    spec:
      containers:
      - name: rest-example
        image: jotka/rest-example
        imagePullPolicy: IfNotPresent
        resources:
          requests:
            cpu: 100m
            memory: 100Mi
        env:
        - name: GET_HOSTS_FROM
          value: dns
        ports:
        - containerPort: 8080
