Enable automatic upgrades of an Azure SQL Managed Instance for Azure Arc
Article
You can set the --desired-version parameter of the spec.update.desiredVersion property of a SQL Managed Instance enabled by Azure Arc to auto to ensure that your managed instance will be upgraded after a data controller upgrade, with no interaction from a user. This setting simplifies management, as you don't need to manually upgrade every instance for every release.
After setting the --desired-version parameter of the spec.update.desiredVersion property to auto the first time, the Azure Arc-enabled data service will begin an upgrade of the managed instance to the newest image version within five minutes, or within the next Maintenance Window. Thereafter, within five minutes of a data controller being upgraded, or within the next maintenance window, the managed instance will begin the upgrade process. This setting works for both directly connected and indirectly connected modes.
If the spec.update.desiredVersion property is pinned to a specific version, automatic upgrades won't take place. This property allows you to let most instances automatically upgrade, while manually managing instances that need a more hands-on approach.
Prerequisites
Your managed instance version must be equal to the data controller version before enabling auto mode.
Enable with Kubernetes tools (kubectl)
Use kubectl to view the existing spec in yaml.
kubectl --namespace <namespace> get sqlmi <sqlmi-name> --output yaml
Administer an SQL Server database infrastructure for cloud, on-premises and hybrid relational databases using the Microsoft PaaS relational database offerings.