# Import ndjson in kibana helm deployment

**URL:** <https://discuss.elastic.co/t/import-ndjson-in-kibana-helm-deployment/215338>\
**Category:** Kibana\
**Created:** [January 16, 2020, 3:09pm UTC](https://discuss.elastic.co/t/import-ndjson-in-kibana-helm-deployment/215338 "2020-01-16T15:09:14Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Voula\_Mikr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voula_mikr/32/58451_2.png) [@Voula\_Mikr](https://discuss.elastic.co/u/Voula_Mikr)\
**Post date:** [January 16, 2020, 3:09pm UTC](https://discuss.elastic.co/t/import-ndjson-in-kibana-helm-deployment/215338/1 "2020-01-16T15:09:15Z")

</div>

Hi,

I have exported some dashboards (ndjson files) and I would like to have these exports imported in a new kibana-helm deployment. Is this possible? If yes, how can I do something like this?

Thank you in advance!

---

<div class="post-metadata">

**Author:** ![Julien\_MAILLERET](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julien_mailleret/32/45074_2.png) [@Julien\_MAILLERET](https://discuss.elastic.co/u/Julien_MAILLERET)\
**Post date:** [January 17, 2020, 4:15am UTC](https://discuss.elastic.co/t/import-ndjson-in-kibana-helm-deployment/215338/2 "2020-01-17T04:15:12Z")

</div>

Hi @Voula_Mikr,  
Kibana dashboards import is not supported by design by Elastic Kibana Helm chart.

The best way ( **not tested** ) to do that would be to use a lifecycle `postStart` [hook](https://kubernetes.io/docs/concepts/containers/container-lifecycle-hooks/) with a script waiting that kibana is up and calling [dashboard import API](https://www.elastic.co/guide/en/kibana/7.5/dashboard-import-api.html). `postStart` hooks can be defined in chart [`values.yaml`](https://github.com/elastic/helm-charts/blob/master/kibana/values.yaml#L125-L127).

---

<div class="post-metadata">

**Author:** ![Voula\_Mikr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voula_mikr/32/58451_2.png) [@Voula\_Mikr](https://discuss.elastic.co/u/Voula_Mikr)\
**Post date:** [January 18, 2020, 8:45am UTC](https://discuss.elastic.co/t/import-ndjson-in-kibana-helm-deployment/215338/3 "2020-01-18T08:45:00Z")

</div>

Thank you for the prompt answer!  
With dashboard import API I guess that in the script I should do a POST request (that has as body the json that i get with a get request ) to a url.  
Is there a posible way to import ndjson files during the helm deployment and not doing POST request?

---

<div class="post-metadata">

**Author:** ![Julien\_MAILLERET](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julien_mailleret/32/45074_2.png) [@Julien\_MAILLERET](https://discuss.elastic.co/u/Julien_MAILLERET)\
**Post date:** [January 19, 2020, 4:49pm UTC](https://discuss.elastic.co/t/import-ndjson-in-kibana-helm-deployment/215338/4 "2020-01-19T16:49:26Z")

</div>

No that's not possible.

---

<div class="post-metadata">

**Author:** ![Voula\_Mikr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voula_mikr/32/58451_2.png) [@Voula\_Mikr](https://discuss.elastic.co/u/Voula_Mikr)\
**Post date:** [January 29, 2020, 6:43am UTC](https://discuss.elastic.co/t/import-ndjson-in-kibana-helm-deployment/215338/5 "2020-01-29T06:43:44Z")

</div>

Ok thank you Julien 🙂

---

<div class="post-metadata">

**Author:** ![Voula\_Mikr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/voula_mikr/32/58451_2.png) [@Voula\_Mikr](https://discuss.elastic.co/u/Voula_Mikr)\
**Post date:** [February 13, 2020, 2:43pm UTC](https://discuss.elastic.co/t/import-ndjson-in-kibana-helm-deployment/215338/6 "2020-02-13T14:43:30Z")

</div>

Hi,

I managed to make it work by making a post-install hook ( [https://helm.sh/docs/topics/charts\_hooks/](https://helm.sh/docs/topics/charts_hooks/) ) that creates a pod (I used alpine-curl) that runs a script which check the status of kibana to be "overall":{"state":"green" (in order kibana container to be Ready - not just the pod to be "Running") and then import the dashboards with curl POST .

---

<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:** [March 12, 2020, 2:43pm UTC](https://discuss.elastic.co/t/import-ndjson-in-kibana-helm-deployment/215338/7 "2020-03-12T14:43:36Z")

</div>

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