apiVersion: apps/v1
kind: Deployment
metadata:
  name: init-crash
  labels:
    name: init-crash
    app: crash-app
spec:
  replicas: 1
  selector:
    matchLabels:
      name: init-crash
      app: crash-app
  progressDeadlineSeconds: 60
  template:
    metadata:
      labels:
        name: init-crash
        app: crash-app
    spec:
      initContainers:
      - name: init-crash-loop-back-off
        image: busybox
        imagePullPolicy: IfNotPresent
        command: ["sh", "-c", "echo 'this is a log from the crashing init container' && test 0 -eq 1"]
      containers:
      - name: app
        image: busybox
        imagePullPolicy: IfNotPresent
        command: ["tail", "-f", "/dev/null"]
