# Best practice running logstash on kubernetes

**URL:** <https://discuss.elastic.co/t/best-practice-running-logstash-on-kubernetes/184107>\
**Category:** Logstash\
**Created:** [June 4, 2019, 7:50am UTC](https://discuss.elastic.co/t/best-practice-running-logstash-on-kubernetes/184107 "2019-06-04T07:50:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![asp](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@asp](https://discuss.elastic.co/u/asp)\
**Post date:** [June 4, 2019, 7:50am UTC](https://discuss.elastic.co/t/best-practice-running-logstash-on-kubernetes/184107/1 "2019-06-04T07:50:57Z")

</div>

Hi,

Currently my logstash instances are running on native docker. Config and pipeline config are mounted from host filesystem into logstash's container directories. I use only one host in this environment, so mounting from file system is straight forward.

I am now learning kubernetes on a private bare metal kubernetes 3 node cluster. Target is to run the complete stack on kubernetes, but I want to start with logstash. We only use memory queues so logstash looks as stateless application for me. (correct me if I am wrong). (ok, I neglect the uuid of logstash instance which I can see in monitoring)

What is best practice in kubernetes to deal with pipeline configuration?

1. Store configuration in kubernetes as config\_map (I understood it this way, that it is possible to save content of a directory to the config\_map and mount this to a container directory)

2. Use some kind of volume (accessible from all k8s cluster nodes

3. Building a new image (elastic default image + copying my configuration)?

What is best practice in production?

I slightly tend to option 3. But to keep this configuration and the image private I need a private docker registry which is accessible from alk k8s nodes, right?

Thanks,  
Andreas

---

<div class="post-metadata">

**Author:** ![asp](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@asp](https://discuss.elastic.co/u/asp)\
**Post date:** [June 12, 2019, 12:09pm UTC](https://discuss.elastic.co/t/best-practice-running-logstash-on-kubernetes/184107/2 "2019-06-12T12:09:33Z")

</div>

no opinions? ☹

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 10, 2019, 12:17pm UTC](https://discuss.elastic.co/t/best-practice-running-logstash-on-kubernetes/184107/3 "2019-07-10T12:17:27Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
