Elasticsearch version upgradation

hello,

actually we are using elasticseach and kibana as a docker container in version 8.14.1.

currently the version is 9.0.0, how can we migrate to latest version without any data/indices loss??

when we tried using volume mount , elastic container is continuously restarting.

kindly need guidance here.

thanks,
vignesh raja S

To get to 9.0.0 you need go via 8.18.0 first

From Prepare to upgrade | Elastic Docs

"To upgrade from 8.17.0 or earlier to 9.0.0, you must first upgrade to the latest 8.18 patch release" (which is 8.18.0 as of now)

Be aware that 9.0.0 has some breaking changes ...