1

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
  • 31
  • 1
  • 7
  • Can you verify this is not the case https://stackoverflow.com/questions/55417410/kubernetes-create-deployment-unexpected-schemaerror – mchawre Jul 20 '19 at 15:41
  • Thanks @mchawre, that solved my original problem but my newly imported cluster is in pending state now. I tried this command: kubectl -n cattle-system logs -l app=cattle-cluster-agent. I am getting this in the logs: ERROR: localhost/ping is not accessible (Failed to connect to localhost port 443: Connection refused) – Amit Singh Jul 20 '19 at 17:44
  • Can you update the question with the new error you got. So that others can answer it by looking at the question, rather than going through the comments. – mchawre Jul 21 '19 at 11:52
  • Rancher installs require a resolvable DNS name. Could you please check if that is the case? – Wytrzymały Wiktor Jul 29 '19 at 09:39

1 Answers1

0

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
  • 95
  • 1
  • 1
  • 10