Use ELB hostname in the generated kubeconfig when using private DNS

This commit is contained in:
Arto Jantunen 2017-11-29 15:12:58 +02:00
parent dd64f1ed6c
commit 7639487e4f
1 changed files with 3 additions and 1 deletions

View File

@ -35,7 +35,9 @@ func BuildKubecfg(cluster *kops.Cluster, keyStore fi.Keystore, secretStore fi.Se
}
server := "https://" + master
if dns.IsGossipHostname(master) {
topology := cluster.Spec.Topology
if dns.IsGossipHostname(master) || topology.DNS.Type == kops.DNSTypePrivate {
ingresses, err := status.GetApiIngressStatus(cluster)
if err != nil {
return nil, fmt.Errorf("error getting ingress status: %v", err)