Failure in importing local Kubernetes cluster into Rancher

Hi,
I am using Rancher 2.X. I have installed it on my local machine. I have also installed a local Kubernetes cluster using Minikube. When I try to create a cluster in Rancher UI and import the existing K8s cluster, I am asked to run the following command on my K8s cluster using kubectl:

kubectl apply -f https://10.41.124.40/v3/import/g2gk5ntvnlh8xtvlngjmxdt22cm6zgtfjhswgcqmhltpg9nt9pvgsc.yaml

But, when I run this command, I get this error:

error: SchemaError(io.k8s.api.core.v1.ComponentCondition): invalid object doesn’t have additional properties

What am I doing wrong?

Thanks!!!

Probably related to your kubectl version, can you share the output of which kubectl and kubectl version?

1 Like

which kubectl: /usr/local/bin/kubectl

kubectl version:
Client Version: version.Info{Major:β€œ1”, Minor:β€œ10”, GitVersion:β€œv1.10.11”, GitCommit:β€œ637c7e288581ee40ab4ca210618a89a555b6e7e9”, GitTreeState:β€œclean”, BuildDate:β€œ2018-11-26T14:38:32Z”, GoVersion:β€œgo1.9.3”, Compiler:β€œgc”, Platform:β€œdarwin/amd64”}

Server Version: version.Info{Major:β€œ1”, Minor:β€œ15”, GitVersion:β€œv1.15.0”, GitCommit:β€œe8462b5b5dc2584fdcd18e6bcfe9f1e4d970a529”, GitTreeState:β€œclean”, BuildDate:β€œ2019-06-19T16:32:14Z”, GoVersion:β€œgo1.12.5”, Compiler:β€œgc”, Platform:β€œlinux/amd64”}

kubectl version --short:
Client Version: v1.10.11
Server Version: v1.15.0

Can you update your kubectl version and try again? At least 1.14 if server is 1.15.