> In a multi-tenant architecture where each tenant has its own database,
> what would be the best way for each of the microservices to obtain
> information about the tenant (such as which database to connect to)?

Agnosticism and a lot of parametrization.

Make the MS agnostic to the concept "tenancy". How to do so? Parametrizing the data source. By configuration, each MS will use only 1 database (or 1 schema in the unique DB, or whatever) and it won't care if such DB is tenant A's DB or tenant B's DB. It's just a database.

From the deployment view, it takes to deploy 1 MS per tenant/configuration.

But you don't just deploy n MS to the wild. You have to build clusters per tenant. Each cluster has all the MS required, scaled accordingly and replicated (if needed).

As you may guess by now, this is a lot of MS running.