This message was deleted.
# general
a
This message was deleted.
b
kubectl apply -f cluster.yaml
p
the file has no api or kind etc associated with it, would it still kubectl apply?
at least not the way its built with the gui
b
From the Rancher GUI?
p
b
Oh, that is an RKE cluster. That you cannot apply. I thought you were talking about a cluster.yaml like the ones that do get applied by Rancher.
p
i wish 😞
h
Isn't this how we can do for RKE? (maybe I am misunderstanding your question):
Copy code
rke up --config <path to your cluster.yaml>
b
Yes, but that creates a new cluster and doesn't put it in Rancher.
p
^ its the 'put it in rancher' part that i want lol
aka rancher managed not just imported
b
I will say that what you are trying to accomplish is possible, but you need the cluster.yaml that Rancher uses. There is also a Rancher terraform provider that can help you accomplish this.
p
ya i might end up just rewriting in terraform
just dont like the idea of maintaining two states (terraform + rancher)
b
What I would do: create the cluster that you want to create in Rancher, but before creating it, look at the YAML. There is a button for this in the UI. That is essentially the YAML that you would need to apply. It would take some experimenting to get right, but that is how I would go about it.