401 Unauthorized

Hi i trying connect my kubernetes agent to elastic-stack using fleet token
but after deployment have error

"Failed to connect to backoff(elasticsearch(https://elasticsearch.logging-stack.svc.cluster.local:9200)): 401 Unauthorized:

and in elastic

"WARN", "message":"Authentication using apikey failed - unable to find apikey with id Gq5JNo0BsY97fr8bys6p", "ecs.version

using newest elastic 8.12.0

Fleet working well

Elastic agents kubernetes manifest keeps a set of persistent volumes for the agent. It might make sense to try deleting that volume or connecting to the container and deleting the state directory and deploying again.

In particular, if the agent on that node had been deployed against a different fleet or a different Elasticsearch cluster, changing the enrollment token or the fleet server in the manifest won't have an effect because the fleet server and ES token are already cached on disk

I believe this is the same as this issue Elastic Agent doesn't update the enrollment token in Kubernetes Deployment statefile · Issue #3586 · elastic/elastic-agent · GitHub

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