I am facing issue when trying to import k8s cluster in Rancher.

here are the logs of when trying to run the commands:


curl --insecure -sfL | kubectl apply -f -


clusterrole.rbac.authorization.k8s.io/proxy-clusterrole-kubeapiserver unchanged

clusterrolebinding.rbac.authorization.k8s.io/proxy-role-binding-kubernetes-master unchanged
namespace/cattle-system unchanged
serviceaccount/cattle unchanged
clusterrolebinding.rbac.authorization.k8s.io/cattle-admin-binding unchanged
secret/cattle-credentials-f144527 unchanged
clusterrole.rbac.authorization.k8s.io/cattle-admin unchanged
deployment.apps/cattle-cluster-agent configured
service/cattle-cluster-agent unchanged

Second Command:

kubectl apply -f


Unable to connect to the server: tls: failed to verify certificate: x509: certificate signed by unknown authority

Unable to identify the issue. As rancher is running on separate e2 instance under Docker and K8s cluster is running separate machine and worker node as well.

For reference sharing the snap shot:

enter image description here enter image description here

I check out almost the number of given answer here related to SSL but not able to find and relevant answer.

  • Can you check the api server logs or certificate paths? Commented Jul 19, 2023 at 11:53
  • @DeepakMourya thanks . AS the issue has been resolved. Commented Jul 19, 2023 at 12:19
  • There was issue with kubectl version of Rancher and K8s server. By the way we can use the first command to add import the cluster. Commented Jul 19, 2023 at 12:20

1 Answer 1


Create file daemon.json in /etc/docker/ inside put this: { "insecure-registries" : ["docker-registry-machine-name:443","docker-registry-machine-name:80",""] } and save it.

After that with jenkins user run this command: git config --global http.sslVerify "false"

Then restart Jenkins and should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.