I had a Deployment going in Error with a rather uninformative message (a sed error out of a bunch of sed commands inside our entrypoint script, named docker-entrypoint.sh). We needed a set -x (which was, alas, missing from the entrypoint script).

In the section spec.template.spec.container of the Deployment YAML, I added

command: ['bash', '-x', '/docker-entrypoint.sh']

so that it looked like:

[...]
        image: a_user/an_image:a_tag
        command: ['bash', '-x', '/docker-entrypoint.sh']
        imagePullPolicy: IfNotPresent
[...]

Apply the change kubectl -n <ns> --context=<context> apply -f <deployment.yaml> and wait for next restart (if the PODs are crashlooping) or delete the pods manually.

You’ll need to adapt based on your Dockerfile if you want to try it.

Do a kubectl logs <pod-name> to check the log for debugging entries.