dockerkubernetesdockerfilecommanddocker-entrypoint

Change entrypoint of a k8s Pod, but keep the CMD


How to change the Docker ENTRYPOINT in a Kubernetes deployment, without changing also the Docker CMD?

In the Pod I would do

image: "alpine"
entrypoint: "/myentrypoint"

but this overwrites either ENTRYPOINT and the CMD from the Dockerfile.

The documentation doesn't mention it, but seems like a big use-case missed.


Solution

  • That's not a thing.

    So just override command but not args.