apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: spring-boot-k8s
  name: spring-boot-k8s
spec:
  replicas: 2
  selector:
    matchLabels:
      app: spring-boot-k8s
  strategy: { }
  template:
    metadata:
      labels:
        app: spring-boot-k8s
    spec:
      containers:
        - image: uuhnaut69/spring-demo
          imagePullPolicy: Always
          name: spring-demo
          resources: { }
          livenessProbe:
            httpGet:
              path: /actuator/health/liveness
              port: 8080
          readinessProbe:
            httpGet:
              path: /actuator/health/readiness
              port: 8080
          lifecycle:
            preStop:
              exec:
                command: [ "sh", "-c", "sleep 10" ]
