Cannot load logstash config file on kubernetes

2/24/2019

I'm trying to deploy logstash to kubernetes. Before I was running it by docker compose and it was working. On compose i have:

    volumes:
  - ./logstash/config/logstash.yml:/usr/share/logstash/config/logstash.yml:ro
  - ./logstash/pipeline:/usr/share/logstash/pipeline:ro

To deploy it on kubernetes I created dockerfile:

FROM docker.elastic.co/logstash/logstash-oss:6.2.3
ADD ./config/logstash.yml /usr/share/logstash/config/logstash.yml:ro
ADD ./pipeline /usr/share/logstash/pipeline:ro

But after run that image logstash doesn't see the config file. (Even locally)

-- Arek Szast
docker
java
kubernetes
logstash
spring

1 Answer

2/24/2019

That Dockerfile works fine for me:

FROM docker.elastic.co/logstash/logstash-oss:6.2.3
RUN rm -f /usr/share/logstash/pipeline/logstash.conf
ADD pipeline/ /usr/share/logstash/pipeline/
ADD config/ /usr/share/logstash/config/

I think before the problem was with overriding the logstash.conf file

-- Arek Szast
Source: StackOverflow