# Manage secrets in fleet managed elastic-agents

**URL:** https://discuss.elastic.co/t/manage-secrets-in-fleet-managed-elastic-agents/358667
**Category:** Elastic Agent
**Tags:** fleet
**Created:** [May 2, 2024, 4:43pm UTC](https://discuss.elastic.co/t/manage-secrets-in-fleet-managed-elastic-agents/358667 "2024-05-02T16:43:40Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![liquidkite](https://avatars.discourse-cdn.com/v4/letter/l/df788c/32.png) [@liquidkite](https://discuss.elastic.co/u/liquidkite)
#### Post date: [May 2, 2024, 4:43pm UTC](https://discuss.elastic.co/t/manage-secrets-in-fleet-managed-elastic-agents/358667/1 "2024-05-02T16:43:40Z")

</div>

Hello all,  
We currently use fleet managed elastic-agents to collect logs from a variety of data sources. We would like to store our secrets that we use for agent policies as a kubernetes secret and use the [kubernetes\_secrets](https://www.elastic.co/guide/en/fleet/current/kubernetes-provider.html) provider. Is this provider supported for fleet managed elastic-agents?

The documentation is a bit sparse on this topic.

---

<div class="post-metadata">

### Author: ![Julia\_Bardi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julia_bardi/32/79463_2.png) [@Julia\_Bardi](https://discuss.elastic.co/u/Julia_Bardi)
#### Post date: [May 21, 2024, 7:35am UTC](https://discuss.elastic.co/t/manage-secrets-in-fleet-managed-elastic-agents/358667/2 "2024-05-21T07:35:00Z")

</div>

Hello,

As far as I know kubernetes\_secrets provider is not supported by Fleet.  
Secrets are stored by Fleet internally if the integration supports it, see this issue for the list of integration secrets: [[Meta] Migration to secret variables · Issue #8610 · elastic/integrations · GitHub](https://github.com/elastic/integrations/issues/8610)

---

<div class="post-metadata">

### Author: ![liquidkite](https://avatars.discourse-cdn.com/v4/letter/l/df788c/32.png) [@liquidkite](https://discuss.elastic.co/u/liquidkite)
#### Post date: [May 24, 2024, 2:47pm UTC](https://discuss.elastic.co/t/manage-secrets-in-fleet-managed-elastic-agents/358667/3 "2024-05-24T14:47:34Z")

</div>

Thanks Julia. Are other providers like the `env` provider supported by fleet managed agents?

---

<div class="post-metadata">

### Author: ![Julia\_Bardi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/julia_bardi/32/79463_2.png) [@Julia\_Bardi](https://discuss.elastic.co/u/Julia_Bardi)
#### Post date: [May 29, 2024, 1:41pm UTC](https://discuss.elastic.co/t/manage-secrets-in-fleet-managed-elastic-agents/358667/4 "2024-05-29T13:41:42Z")

</div>

I got some help from my team:

> The providers all work with Fleet managed agents, they are on by default.  
> `${kubernetes_secrets.<default>.<somesecret>.<value>}` should work in a Fleet managed agent policy. You can try entering that through the integrations configuration UI, which in theory should work.
