cat << EOF > onfailure.yaml apiVersion: v1 kind: Pod metadata: name: completed-pod spec: restartPolicy: OnFailure containers: - name: completed-pod image: busybox command: ["sh"] args: ["-c", "sleep 5 && exit 0"] EOF