# Unable to upgrade Elastic Agents installed on Azure AKS which are managed by Fleet

**URL:** <https://discuss.elastic.co/t/unable-to-upgrade-elastic-agents-installed-on-azure-aks-which-are-managed-by-fleet/375066>\
**Category:** Elastic Agent\
**Created:** [February 26, 2025, 9:39am UTC](https://discuss.elastic.co/t/unable-to-upgrade-elastic-agents-installed-on-azure-aks-which-are-managed-by-fleet/375066 "2025-02-26T09:39:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mattyanyan.work](https://avatars.discourse-cdn.com/v4/letter/m/90db22/32.png) [@mattyanyan.work](https://discuss.elastic.co/u/mattyanyan.work)\
**Post date:** [February 26, 2025, 9:39am UTC](https://discuss.elastic.co/t/unable-to-upgrade-elastic-agents-installed-on-azure-aks-which-are-managed-by-fleet/375066/1 "2025-02-26T09:39:04Z")

</div>

I have an AKS cluster and I have installed Elastic Agents on the cluster by following this documentation: [Run Elastic Agent on Azure AKS managed by Fleet | Fleet and Elastic Agent Guide [8.17] | Elastic](https://www.elastic.co/guide/en/fleet/current/running-on-aks-managed-by-fleet.html)

Recently, I tried to upgrade the Elastic Agents by following [Upgrade Fleet-managed Elastic Agents | Fleet and Elastic Agent Guide [8.17] | Elastic](https://www.elastic.co/guide/en/fleet/current/upgrade-elastic-agent.html), but the 'Upgrade agent' button is disabled.

 ![Screenshot 2025-02-26 at 5.20.33 PM](https://us1.discourse-cdn.com/elastic/original/3X/0/3/03ad19952b1b1d5a5df85662bb9b2373210f3ce0.png)

I tried to uninstall the current Elastic Agent and install the latest one, however the new one was unable to connect to the Fleet. After I checked the log from the Elastic Agent pod, I suspect that the local Elastic Agent data from the previous version left in the AKS node is the cause.

Is there any suggested way to upgrade the Elastic Agents installed in AKS?

Thank you!

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [February 26, 2025, 1:35pm UTC](https://discuss.elastic.co/t/unable-to-upgrade-elastic-agents-installed-on-azure-aks-which-are-managed-by-fleet/375066/2 "2025-02-26T13:35:52Z")

</div>

You installed the agents following this [documentation](https://www.elastic.co/guide/en/fleet/current/running-on-kubernetes-managed-by-fleet.html), right?

I do not use Kubernetes, but since you use a manifest to install, I think you would need to change the version on the manifest.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [February 26, 2025, 2:44pm UTC](https://discuss.elastic.co/t/unable-to-upgrade-elastic-agents-installed-on-azure-aks-which-are-managed-by-fleet/375066/3 "2025-02-26T14:44:19Z")

</div>

Hi @mattyanyan.work Welcome to the community.

Just to check ...

What version of the Elastic Stack are you using?

What version are the agents currently on?

But yes hover over this the little `i` next to the version and you should see this..

This is my fleet-managed elastic agent running in K8s.

 ![Screenshot 2025-02-26 at 6.41.28 AM](https://us1.discourse-cdn.com/elastic/original/3X/e/4/e4a9967cbfc80bfb8947acffc0f008857b369ed9.png)

So, in short, you re- `apply` the manifest with the correct version.

And the agent can not / should not be ahead of the Elastic version
