I have a job with restartPolicy: Never
and completions and parallelism = 1. However the spec says: Note that even if you specify .spec.parallelism = 1 and .spec.completions = 1 and .spec.template.spec.restartPolicy = "Never", the same program may sometimes be started twice.
Can somebody explain why this? And maybe offer a solution that the K8s guys did not think about? :D
I think the reason why
the same program may sometimes be started twice.
is because of the provided consistency guarantees. In distributed environments, guaranteeing various levels of strictness often comes with a performance trade-off. I might be wrong, but that’s my guess.