https://rancher.com/ logo
Title
b

bright-pillow-31910

03/08/2023, 8:37 AM
hello everyone ,I have changed my rancher url certificate , when using the kubeconfig , I got the error "Unable to connect to the server: x509: certificate signed by unknown authority", does anyone know how to update the kubeconfig certificate-authority-data section
h

happy-tent-70860

03/08/2023, 8:48 AM
Do you have access to the rancher Web UI? if yes, then have you tried to download again the kubeconfig from there?
b

bright-pillow-31910

03/08/2023, 8:55 AM
yes , I have downloaded the kubeconfig from web UI, and client got the error ""Unable to connect to the server: x509: certificate signed by unknown authority""
h

happy-tent-70860

03/08/2023, 8:55 AM
and how did you upgrade the cert for the cluster?
b

bright-pillow-31910

03/08/2023, 8:59 AM
I just upgrade the certificate in nginx
This is my architecture diagram
h

happy-tent-70860

03/08/2023, 9:13 AM
is that a self signed cert?
b

bright-pillow-31910

03/08/2023, 9:14 AM
yes, it's a self signed cert
h

happy-tent-70860

03/08/2023, 9:20 AM
First create a backup of your kubeconfig file. Just in case. Identify the name of your cluster in your kubeconfig using
kubectl config get-clusters
Then try to set the CA for it using
kubectl config set-cluster <YOUR CLUSTER NAME> --embed-certs --certificate-authority=<YOUR CA FILE PATH HERE>
b

bright-pillow-31910

03/08/2023, 9:37 AM
thanks Laszlo, it works on client, but how to update the kubeconfig in web ui ?
h

happy-tent-70860

03/08/2023, 9:44 AM
That's something I don't know right now ... 😞 sorry. I'm more literate with kubernetes than with Rancher ...