# Specify \`spec.policyID\` with standalone Elastic Agent deployed with ECK

**URL:** <https://discuss.elastic.co/t/specify-spec-policyid-with-standalone-elastic-agent-deployed-with-eck/335910>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [June 13, 2023, 7:34pm UTC](https://discuss.elastic.co/t/specify-spec-policyid-with-standalone-elastic-agent-deployed-with-eck/335910 "2023-06-13T19:34:52Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![DougR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dougr/32/48095_2.png) [@DougR](https://discuss.elastic.co/u/DougR)\
**Post date:** [June 13, 2023, 7:34pm UTC](https://discuss.elastic.co/t/specify-spec-policyid-with-standalone-elastic-agent-deployed-with-eck/335910/1 "2023-06-13T19:34:52Z")

</div>

# TL;DR

ECK wants me to specify `spec.policyID` when deploying Elastic Agent, but I'm deploying a standalone Agent. Can I do this?

# Details

I am using the Elastic Operator (ECK) to deploy standalone Elastic Agent to my cluster. Since my update to ECK 2.8.0, I've started to receive the following warning when I deploy:

```auto
Warning: Agent elastic-system/elastic-agent: spec.PolicyID is empty, spec.PolicyID will become mandatory in a future release

```

However, when I look up `spec.policyID` in the ECK [documentation](https://www.elastic.co/guide/en/cloud-on-k8s/master/k8s-api-agent-k8s-elastic-co-v1alpha1.html), it states:

> PolicyID determines into which Agent Policy this Agent will be enrolled. This field will become mandatory in a future release, default policies are deprecated since 8.1.0.

Additionally, the [examples](https://github.com/elastic/cloud-on-k8s/blob/main/deploy/eck-stack/examples/agent/fleet-agents.yaml) that I've been able to find exclusively show this field being used with a fleet policy.

My question is two-fold:

- Can I provide `spec.policyID` with a standalone policy (e.g., a UUID)?
- If yes, what value should I provide?

---

<div class="post-metadata">

**Author:** ![michael.morello](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael.morello/32/47448_2.png) [@michael.morello](https://discuss.elastic.co/u/michael.morello)\
**Post date:** [June 14, 2023, 7:10am UTC](https://discuss.elastic.co/t/specify-spec-policyid-with-standalone-elastic-agent-deployed-with-eck/335910/2 "2023-06-14T07:10:37Z")

</div>

My bad, sorry about that. I created an issue: [Agent: "spec.PolicyID is empty" warning is raised despite Agent is running in standalone mode · Issue #6903 · elastic/cloud-on-k8s · GitHub](https://github.com/elastic/cloud-on-k8s/issues/6903) I'll try to get it fixed in the next version.

---

<div class="post-metadata">

**Author:** ![DougR](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dougr/32/48095_2.png) [@DougR](https://discuss.elastic.co/u/DougR)\
**Post date:** [June 14, 2023, 12:39pm UTC](https://discuss.elastic.co/t/specify-spec-policyid-with-standalone-elastic-agent-deployed-with-eck/335910/3 "2023-06-14T12:39:54Z")

</div>

Thanks!

---

<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 12, 2023, 12:40pm UTC](https://discuss.elastic.co/t/specify-spec-policyid-with-standalone-elastic-agent-deployed-with-eck/335910/4 "2023-07-12T12:40:47Z")

</div>

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