Hi @amruthapbhat
Thank you for the question!
You can also disable the random password via environment variable. If I understand your scenario correctly, you would set the environment variable when you start your 3.22 container.
When doing the upgrade remember that Nexus 3.15 - 3.22 do not support rolling upgrades or cross version clustering. You must completely stop your 3.15 instance so that no other running instances are accessing your /nexus-data
when you start your 3.22 instance.
More information on the default random password can be found on this post Is that possible to install a nexus chart with a given initial password?