apiVersion: apps/v1 kind: Deployment metadata: name: ${APP_NAME} namespace: ${NAMESPACE} labels: app: ${APP_NAME} spec: replicas: ${REPLICAS} selector: matchLabels: app: ${APP_NAME} template: metadata: labels: app: ${APP_NAME} spec: terminationGracePeriodSeconds: 30 containers: - name: ${APP_NAME} image: ${IMAGE} imagePullPolicy: Always ports: - containerPort: ${PORT} protocol: TCP - containerPort: 1024 protocol: TCP lifecycle: preStop: exec: command: [ "curl","-X","POST","http://127.0.0.1:1024/actuator/offline" ] livenessProbe: httpGet: scheme: HTTP path: /actuator/health/liveness port: 1024 initialDelaySeconds: 30 periodSeconds: 10 readinessProbe: httpGet: scheme: HTTP path: /actuator/health/readiness port: 1024 initialDelaySeconds: 30 periodSeconds: 10 imagePullSecrets: - name: kp-schbrain