apiVersion: v1
kind: Pod
metadata:
  name: pod-readiness-exec
  labels:
    app: readiness
spec:
  containers:
    - name: con-02-readiness
      image: kubetm/app
      ports:
      - containerPort: 8080
      readinessProbe:
        exec:
          command: ["cat", "/readiness/ready.txt"]
        initialDelaySeconds: 5
        periodSeconds: 10
        successThreshold: 3
      volumeMounts:
      - name: host-path
        mountPath: /readiness
  volumes:
  - name: host-path
    hostPath:
      path: /tmp/readiness
      type: DirectoryOrCreate
      
