# Migrate from ELK to ECK - roles, role\_mappings

**URL:** <https://discuss.elastic.co/t/migrate-from-elk-to-eck-roles-role-mappings/330505>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [April 21, 2023, 9:33am UTC](https://discuss.elastic.co/t/migrate-from-elk-to-eck-roles-role-mappings/330505 "2023-04-21T09:33:06Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![charlot\_Attard](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@charlot\_Attard](https://discuss.elastic.co/u/charlot_Attard)\
**Post date:** [April 21, 2023, 9:33am UTC](https://discuss.elastic.co/t/migrate-from-elk-to-eck-roles-role-mappings/330505/1 "2023-04-21T09:33:07Z")

</div>

Hello,

We are migrating ELK Version 7.17.0 to ECK Version 7.17.0 and we want to automate as much as we can the setup of the cluster. Is there a way whilst provisioning the ECK in the yaml manifets or init scripts we create custom roles and custom role\_mappings so when we restore from ELK - their is less manual overhead ?

Thankyou

---

<div class="post-metadata">

**Author:** ![Thibault\_Richard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thibault_richard/32/50513_2.png) [@Thibault\_Richard](https://discuss.elastic.co/u/Thibault_Richard)\
**Post date:** [April 21, 2023, 3:36pm UTC](https://discuss.elastic.co/t/migrate-from-elk-to-eck-roles-role-mappings/330505/2 "2023-04-21T15:36:05Z")

</div>

Hello,

We fully support the Elasticsearch file realm in ECK [Users and roles | Elastic Cloud on Kubernetes [2.6] | Elastic](https://www.elastic.co/guide/en/cloud-on-k8s/2.6/k8s-users-and-roles.html#k8s_file_realm).

---

<div class="post-metadata">

**Author:** ![charlot\_Attard](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@charlot\_Attard](https://discuss.elastic.co/u/charlot_Attard)\
**Post date:** [April 24, 2023, 7:03am UTC](https://discuss.elastic.co/t/migrate-from-elk-to-eck-roles-role-mappings/330505/3 "2023-04-24T07:03:24Z")

</div>

Its not possible to run a bash script which connects with api and create the roles ? Once elasticsearch starts ? If it is possible can you give me an example where and how we can implement it ? Thanks a lot

---

<div class="post-metadata">

**Author:** ![charlot\_Attard](https://avatars.discourse-cdn.com/v4/letter/c/8797f3/32.png) [@charlot\_Attard](https://discuss.elastic.co/u/charlot_Attard)\
**Post date:** [April 26, 2023, 7:14am UTC](https://discuss.elastic.co/t/migrate-from-elk-to-eck-roles-role-mappings/330505/4 "2023-04-26T07:14:00Z")

</div>

> [@charlot\_Attard](#):
>
> Its not possible to run a bash script which connects with api and create the roles ? Once elasticsearch starts ? If it is possible can you give me an example where and how we can implement it ? Thanks a lot

Hello @Thibault_Richard,

This article caters only for roles, whilst we need to export and import role\_mappings also

---

<div class="post-metadata">

**Author:** ![Thibault\_Richard](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thibault_richard/32/50513_2.png) [@Thibault\_Richard](https://discuss.elastic.co/u/Thibault_Richard)\
**Post date:** [April 28, 2023, 4:14pm UTC](https://discuss.elastic.co/t/migrate-from-elk-to-eck-roles-role-mappings/330505/5 "2023-04-28T16:14:03Z")

</div>

For advanced configurations like role mappings, there is:  
[Elastic Stack configuration policies | Elastic Cloud on Kubernetes [2.7] | Elastic](https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-stack-config-policy.html).

---

<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:** [May 26, 2023, 4:15pm UTC](https://discuss.elastic.co/t/migrate-from-elk-to-eck-roles-role-mappings/330505/6 "2023-05-26T16:15:00Z")

</div>

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