apiVersion: apps/v1
kind: Deployment
metadata:
  name: greet-v2
spec:
  replicas: 2
  selector:
    matchLabels:
      app: greet
  template:
    metadata:
      labels:
        app: greet
        ver: 1.0.3
    spec:
      terminationGracePeriodSeconds: 5 
      containers:
      - name: greet
        image: k8ssa/hands-on-greeting-api:1.0.3
        imagePullPolicy: IfNotPresent 
        resources:
          requests:
            cpu: 100m
            memory: 50Mi
          limits:
            cpu: 100m
            memory: 50Mi
        ports:
        - containerPort: 8080
        livenessProbe:
          httpGet:
            path: /health
            port: 8080
          periodSeconds: 5
          timeoutSeconds: 5
          successThreshold: 1
          failureThreshold: 5
          initialDelaySeconds: 5
        readinessProbe:
          failureThreshold: 5
          httpGet:
            path: /health
            port: 8080
            scheme: HTTP
          periodSeconds: 5
          successThreshold: 1
          timeoutSeconds: 5
