Setting the PROMETHEUS_MULTIPROC_DIR and creating this directory through a Dockerfile does not make the client work, getting the error env PROMETHEUS_MULTIPROC_DIR is not set or not a directory, but only with Kubernetes.
FYI, it works when setting through the ENTRYPOINT of the Dockerfile.
So, this does not work :
ENV PROMETHEUS_MULTIPROC_DIR="/tmp/proc_dir"
RUN mkdir -p "$PROMETHEUS_MULTIPROC_DIR"
But this works :
ENV PROMETHEUS_MULTIPROC_DIR="/tmp/proc_dir"
ENTRYPOINT ["/bin/sh", "-c", "mkdir -p $PROMETHEUS_MULTIPROC_DIR"]