Failure in importing local Kubernetes cluster into Rancher

7/20/2019

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!!!

-- Amit Singh
docker
kubernetes
rancher

1 Answer

11/7/2019

Let try with this:

curl -sKL https://10.41.124.40:8443/v3/import/g2gk5ntvnlh8xtvlngjmxdt22cm6zgtfjhswgcqmhltpg9nt9pvgsc.yaml > /tmp/cluster.yaml && kubectl apply -f /tmp/cluster.yaml
-- Cuong Nguyen
Source: StackOverflow