diff --git a/source/skipper_routegroup.go b/source/skipper_routegroup.go index 2c3475ac4..3854722cc 100644 --- a/source/skipper_routegroup.go +++ b/source/skipper_routegroup.go @@ -210,7 +210,8 @@ func NewRouteGroupSource(timeout time.Duration, token, tokenPath, apiServerURL, apiServer := u.String() // strip port if well known port, because of TLS certificate match if u.Scheme == "https" && u.Port() == "443" { - apiServer = "https://" + u.Hostname() + // correctly handle IPv6 addresses by keeping surrounding `[]`. + apiServer = "https://" + strings.TrimSuffix(u.Host, ":443") } sc := &routeGroupSource{