﻿apiVersion: apps/v1
kind: Deployment
metadata:
  name: api
spec:
  replicas: 2
  selector:
    matchLabels:
      app: api
  template:
    metadata:
      labels:
        app: api
    spec:
      containers:
        - name: api
          image: k8s-api:0.0.1
          ports:
            - containerPort: 3333
            - containerPort: 9000
          resources:
            requests:
              memory: 50Mi
              cpu: 20m
            limits:
              memory: 128Mi
              cpu: 60m
          readinessProbe:
            httpGet:
              path: /ready
              port: 9000
            initialDelaySeconds: 5
            periodSeconds: 5
            failureThreshold: 1
            successThreshold: 1
          livenessProbe:
            httpGet:
              path: /live
              port: 9000
            initialDelaySeconds: 10
            periodSeconds: 30
            failureThreshold: 3
            successThreshold: 1
