# How to create Keystore and Truststore from CA Certificates

**URL:** <https://discuss.elastic.co/t/how-to-create-keystore-and-truststore-from-ca-certificates/224156>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [March 18, 2020, 4:34pm UTC](https://discuss.elastic.co/t/how-to-create-keystore-and-truststore-from-ca-certificates/224156 "2020-03-18T16:34:38Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![YaSe](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yase/32/52227_2.png) [@YaSe](https://discuss.elastic.co/u/YaSe)\
**Post date:** [March 20, 2020, 12:25pm UTC](https://discuss.elastic.co/t/how-to-create-keystore-and-truststore-from-ca-certificates/224156/5 "2020-03-20T12:25:50Z")

</div>

@charith-elastic, Thanks for the tips, I achieved to solve my problem 🥳 !  
It was a wrong path to the location of my truststore file.  
I set the wrong following configuration in spark

```auto
--conf spark.kubernetes.driver.secrets.elasticsearch-truststore-secret=/etc/secrets/trutstore.jks
--conf spark.kubernetes.driver.secrets.elasticsearch-truststore-secret=/etc/secrets/trutstore.jks

```

Then, it created a folder named `trutstore.jks` not a file.

So I just changed for:

```auto
--conf spark.kubernetes.driver.secrets.elasticsearch-truststore-secret=/etc/secrets/trutstore
--conf spark.kubernetes.driver.secrets.elasticsearch-truststore-secret=/etc/secrets/trutstore

```

And the right location is `/etc/secrets/trutstore/trutstore.jks`

Yassir

---

_[View the full topic](https://discuss.elastic.co/t/how-to-create-keystore-and-truststore-from-ca-certificates/224156)._
