The ability to change or set model names is a long sought for feature. It comes up regularly and I thought to cover this some here:
Juju does not currently support changing names of models (2025-February) version 3.6+
Why be able to change name of models?
Names on models is how we can organize ourselves when multiple users collaborate with juju services and their use. Its how we can communicate efficiently to find, organize and reason about our systems together in teams. Names matters alot there.
For example, one might name models after clients that are hosted, like: “client-system-foo”, “client-system-bar”. Then suddenly the client decided to change name. How would we communicate with team-members about this when a client name suddenly doesn’t mean the same thing any more? A redeploy is the only option, when a simple name change would have resolved it.
Another example is that you might have a domain name for a SaaS being used in the model name to help keep track of that this service is hosted from a particular model. Like “my-service-example-com”. If its then decided to “rebrand” the service into "another-service-example-com. Imagine the confusion when this name suddenly indicates something that isn’t there any more. A name change would have resolved it, but now a redeploy is needed again.
The ability to “rename” juju models would be a nice improvement to Juju going forward and help us be even more efficient in operating complex infrastructure.
I think this is impossible with the present implementation, because it would be unpractical with kubernetes models as they correspond to namespaces.
IIRC there were talks of a future possibility to conceptually separate models and k8s namespaces. If and when, this could be opened up again?
Yeah, there’s a few moving parts. We have a feature request jira board where things like this can be added. The prioritisation of these requests is done by the juju director and product manager.
I would consider the “model_uuid” would be much more a stable reference and I guess that would be usable also for k8 namespaces?
Renaming models would allow one to be much more organized over time.
Our naming standards has drifted significantly over the years and we are now left with a mess in our controllers where multiple generations of model names exists and causes lots of confusion.
This feature would target the “operations” of infrastructure directly, which is what juju should be all about?
Actually recently we encountered situation when also inability to rename juju application forces us actually to redeploy. Please see the following comment on the Github issue: