apiVersion: apps/v1
kind: Deployment
metadata:
  name: api-deployment
spec:
  replicas: 5
  selector:
    matchLabels:
      app: api
  template: 
    metadata:       
      labels:
        app: api
    spec:            
      containers:
      - name: api
        image: kubedevio/api-produto:v1
        ports:
        - containerPort: 80
        imagePullPolicy: Always
        env:
          - name: MONGODB_URI
            value: mongodb://mongodbuser:mongodbpwd@mongo-service:27017/admin
        livenessProbe:
          httpGet:
            path: /health
            port: 8080   