diff --git a/registry/kubernetes/kubernetes.go b/registry/kubernetes/kubernetes.go index 711a8234..88a76e52 100644 --- a/registry/kubernetes/kubernetes.go +++ b/registry/kubernetes/kubernetes.go @@ -57,7 +57,7 @@ func (c *kregistry) GetService(name string) (*registry.Service, error) { for _, item := range services.Items { ks.Nodes = append(ks.Nodes, ®istry.Node{ - Address: item.Spec.PortalIP, + Address: item.Spec.ClusterIP, Port: item.Spec.Ports[0].Port, }) } diff --git a/registry/kubernetes/watcher.go b/registry/kubernetes/watcher.go index 08f80433..4059d8e9 100644 --- a/registry/kubernetes/watcher.go +++ b/registry/kubernetes/watcher.go @@ -26,7 +26,7 @@ func (k *watcher) OnUpdate(services []api.Service) { } activeServices.Insert(name) - serviceIP := net.ParseIP(svc.Spec.PortalIP) + serviceIP := net.ParseIP(svc.Spec.ClusterIP) ks := ®istry.Service{ Name: name,