简体   繁体   中英

Private IP address advertised in public DNS records for federated services with Kubernetes 1.3 and an OpenStack cloud provider

I run into the following problem while testing the new cluster federation features of Kubernetes 1.3.6 with k8s clusters configured with an OpenStack cloud provider. When I create a federated service, k8s creates a DNS record for every LoadBalancer Ingress IP of the underlying services created on each cluster. When creating a service in loadbalancer mode with OpenStack, two IP addresses are returned:

  • the vip associated with the OpenStack loadbalancer
  • the floating IP attached to this vip

The floating IP is a public IP that can be used to reach the service. The vip can be used only within the associated OpenStack private network. Both IP addresses wind up in public DNS records. What's the point of returning the vip for a k8s service created with an OpenStack loadbalancer ?

Thats a fair point.

Whats the distinction between the 2 IPs in status? Right now, we just extract all the IPs from service status and put them in DNS records. How do we know which one is supposed to work only within cluster and which one is global?

For reference, here is the relevant code: https://github.com/kubernetes/kubernetes/blob/cf4ea938c882d5f86852994807b18959458033d5/federation/pkg/federation-controller/service/dns.go#L43

Please feel free to file a bug at https://github.com/kubernetes/kubernetes/issues/new or better send a PR to fix that code :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM