diff --git a/pkg/apis/minio.min.io/v1/helper.go b/pkg/apis/minio.min.io/v1/helper.go index 0872e66452b..71d9228a751 100644 --- a/pkg/apis/minio.min.io/v1/helper.go +++ b/pkg/apis/minio.min.io/v1/helper.go @@ -494,7 +494,15 @@ func (t *Tenant) UpdateURL(lrTime time.Time, overrideURL string) (string, error) // MinIOServerHostAddress similar to MinIOServerHost but returns host with port func (t *Tenant) MinIOServerHostAddress() string { - return net.JoinHostPort(t.MinIOServerHost(), strconv.Itoa(MinIOPort)) + var port int + + if t.TLS() { + port = MinIOTLSPortLoadBalancerSVC + } else { + port = MinIOPortLoadBalancerSVC + } + + return net.JoinHostPort(t.MinIOServerHost(), strconv.Itoa(port)) } // MinIOServerEndpoint similar to MinIOServerHostAddress but a URL with current scheme