How to change serverl-url in Rancher 2.x

Initial I set up Rancher 2.0.6 HA using RKE. The server-url in GUI set to
https://rancher2.abc.com/ and I could access Rancher 2 UI using server-url value.

Then I change server-url to https://dev-rancher2.abc.com/ in UI and update rancher ingress using kubectl to update ingress rule host = dev-rancher2.abc.com

Everything seem OK and I could access Rancher 2.x console via url https://dev-rancher2.abc.com/

However I launch kubectl via Rancher UI. The ~/.kube/config still have old server-url value. i.e.

apiVersion: v1
kind: Config
clusters:

What I need to change so that ‘launch kubectl’ from Rancher UI getting latest value ?

1 Like

Hi,

I’m trying to update the Rancher2 server-url field (v2.2.4) through the UI and have Rancher reconfigure my kubernetes cluster provisioned with the OpenNebula node driver (infrastructure provider), but this only works with the old server-url.

I read in the Rancher2 documentation (https://rancher.com/docs/rancher/v2.x/en/admin-settings/):

Important! After you set the Rancher Server URL, we do not support updating it. Set the URL with extreme care.

but there is some way to reconfigure the cluster with the new FQDN ?

Thanks,

Finally, reading this article I have been able to update the server-url correctly: