kops icon indicating copy to clipboard operation
kops copied to clipboard

kops export kubecfg server name

Open olu-alabi opened this issue 2 months ago • 7 comments

Hi,

I just upgraded my kops from version 1.25.4 to 1.25.16. I have noticed that when I run kops export kubecfg --admin, the server name in my kube config is now the long elb name. Is there a flag or a way to return it to the kops 1.25 server name?

kops 1.26 server: https://api-xxxxxxxxx-xxxxxxx-1234567890.eu-west-2.elb.amazonaws.com/

kubectl cluster-info Kubernetes control plane is running at https://api-xxxxxxxxx-xxxxxxx-1234567890.eu-west-2.elb.amazonaws.com

Kops 1.25

server: https://api/.<cluster_name>

kubectl cluster-info Kubernetes control plane is running at https://api/.<cluster_name>

olu-alabi avatar Oct 17 '25 15:10 olu-alabi

Hi @olu-alabi, I think the flag you are looking for is --api-server, but it's available starting kOps 1.33.

hakman avatar Oct 17 '25 15:10 hakman

Hi @olu-alabi, I think the flag you are looking for is --api-server, but it's available starting kOps 1.33.

Thanks @hakman . So basically no way to force the kops 1.25 behaviour until I am able to upgrade to kops 1.33

olu-alabi avatar Oct 17 '25 15:10 olu-alabi

What I meant is that I want Kops to build the cluster using the kops 1.25 behaviour(using DNS name of server address) instead of kops 1.26 behaviour (using the address of the load balancer)

olu-alabi avatar Oct 20 '25 10:10 olu-alabi

Could you explain the reason for the ask?

hakman avatar Oct 20 '25 10:10 hakman

Thanks. @hakman I have a lot of jobs that uses the api endpoint DNS name. In 1.25 this was api.cluster name but in 1.26 this is now api-xxxxxxxxx-xxxxxxx-1234567890.eu-west-2.elb.amazonaws.com. I will have to do a lot of reconstructions on those jobs to get them working again on kops 1.26. Moreover, the kops 1.26 release note does not mention this at all. so I am also wondering what/where this change was introduced.

olu-alabi avatar Oct 20 '25 11:10 olu-alabi

The jobs can still use that DNS name, it should not change, Just the kubeconfig points to a valid IP. This is a change that was introduced to fix issues with misconfigured DNS. It may not be part of the release notes, as it's not something anyone should rely on.

hakman avatar Oct 20 '25 16:10 hakman

Thank you @hakman . I was actually wondering if there is a simple flag I could pass into my cluster.yaml to force the old 1.25 behaviour? So i guess the only way around it is to set the kops export kubeconfig to point to a valid IP or set the server to the api DNS name.

olu-alabi avatar Oct 20 '25 17:10 olu-alabi