apiVersion: v1
kind: Pod
metadata:
  name: pod-with-initcontainers
  labels:
    app: testapp
spec:
  containers:
  - name: my-container
    image: busybox:1.28
    command: ['sh', '-c', 'cat /tmp/tmp.txt && sleep 64000000']
    volumeMounts:
    - name: mydir
      mountPath: /tmp
  initContainers:
  - name: init-tmp
    image: busybox:1.28
    command: ['sh', '-c', 'touch /tmp/tmp.txt']
    volumeMounts:
    - name: mydir
      mountPath: /tmp
  volumes:
  - name: mydir
    emptyDir: {}