HTTP_HOST issue in Diagnostic > System Check when running Matomo on Kubernetes

I’ve installed Matomo in a kubernetes namespace and I see these errors in Diagnostic > System Check

Unable to execute check for https://matomo.myknamespace.myscluster.kube.mydomain.com/config/config.ini.php: curl_exec: Failed to connect to http://matomo.myknamespace.mykcluster.kube.mydomain.com port 443: Connection refused. Hostname requested was: matomo.myknamespace.mykcluster.kube.mydomain.com

I think the root cause is the fact that this is the external URL. The check inside the pod should use http://matomo.myknamespace.srv.cluster.local:32260 instead.

Is there a way to force an URL rewrite in Matomo?