I have an entrypoint defined in my container image, and it runs before the args specified in my deployment manifest, as it should. But when I execute a command on that container using kubectl exec
, it seems to bypass the container entrypoint. Is this the expected behavior? Can I somehow force it to always use the entrypoint commands?
That's expected. If you really want what's in the entrypoint.sh
you can do something like this:
kubectl exec -it <pod-name> -c <container-name> /path/to/entrypoint.sh
Hope it helps!