check init

apiVersion: v1
kind: Pod
metadata:
name: lumpy-koala
spec:
volumes:

  • name: workdir
    emptyDir: {}
    containers:
  • name: checker
    image: busybox:1.28
    command: [‘sh’, ‘-c’, ‘echo The app is running! && sleep 3600’]
    volumeMounts:
    • name: workdir
      mountPath: /workdir
      initContainers:
  • name: init-lumpy-koala
    image: busybox
    command: [‘sh’, ‘-c’, ‘touch /workdir/calm.txt’]
    volumeMounts:
    • name: workdir
      mountPath: /workdir
      ~