diff --git a/pkg/kt/command/connect.go b/pkg/kt/command/connect.go index fb1fed5a..e19132f4 100644 --- a/pkg/kt/command/connect.go +++ b/pkg/kt/command/connect.go @@ -76,7 +76,7 @@ func connectToCluster(cli kt.CliInterface, options *options.DaemonOptions) (err if namespace == options.Namespace { continue } - log.Debug().Msgf("Serach service in %s namespace...", namespace) + log.Debug().Msgf("Search service in %s namespace...", namespace) singleHosts := kubernetes.ServiceHosts(namespace) for k, v := range singleHosts { if v == "" || v == "None" { diff --git a/pkg/proxy/dnsserver/dnsserver.go b/pkg/proxy/dnsserver/dnsserver.go index ffaf0f63..6c499c2d 100644 --- a/pkg/proxy/dnsserver/dnsserver.go +++ b/pkg/proxy/dnsserver/dnsserver.go @@ -72,7 +72,12 @@ func (s *server) getDomainWithClusterPostfix(origin string, count int) (domain s } } if postfix != "" { - domain = origin + postfix + "." + // @see https://github.com/alibaba/kt-connect/issues/153 + if strings.HasSuffix(postfix, ".") { + domain = origin + postfix + } else { + domain = origin + postfix + "." + } log.Info().Msgf("Format domain %s to %s\n", origin, domain) } return