apiVersion: v1
kind: Pod
metadata:
  name: my-app
  labels:
    app: my-app
spec:
  containers:
    - name: my-app
      image: quay.io/kubermatic-labs/training-application:1.0.1
      tty: true
      stdin: true
      ports:
        - name: http
          containerPort: 8080
      env:
        - name: POD_IP
          valueFrom:
            fieldRef:
              fieldPath: status.podIP
        - name: POD_NAME
          valueFrom:
            fieldRef:
              fieldPath: metadata.name
      livenessProbe:
        initialDelaySeconds: 2
        periodSeconds: 2
        successThreshold: 1
        failureThreshold: 3
        httpGet:
          path: /liveness
          port: 8080
      readinessProbe:
        initialDelaySeconds: 2
        periodSeconds: 2
        successThreshold: 1
        failureThreshold: 3
        httpGet:
          path: /readiness
          port: 8080
