Cluster Registration Command

Greeting, I am very new to Rancher and very new to kubenetes. I have managed to create a cluster successfully, I learnt about Rancher so then went about installing and running it.

After installation I successfully imported the cluster that I built, I then tried to add monitoring but kept getting and error saying that there was a conflict with a local version of monitor on the cluster. So I went about deleting what I could to resolve the issues. I ended up deleting something that I should not have so I went about importing the cluster again but this time I ran into the following problem, I have no clue how to resolve it.

I use the following command to register my cluster in Rancher.
This runs successfully only on the last line I see an error.
Below is the extract from what I see.

root@masternode:~# curl --insecure -sfL | kubectl apply -f -

The Deployment “cattle-cluster-agent” is invalid: spec.template.spec.containers[0].env[7].name: Required value

All I have read about the error, seems to point to an internal Rancher bug, but I am not certian about this nor how to go about fixing it.

Can any one please help me.

Please share versions used and the YAML that is being returned from the curl request.

Thank you for responding. I am very sorry but I am very new to this whole environment. I am doing and learning very much without really understanding what it is that I am actually doing.
As I said earlier, I did have this working in Rancher and when trying to find what is conflicting with monitoring, I managed to delete something that broke rancher.
I have now managed to recover this. What I did was use the same Cluster names as the one that I deleted. So right now I am back where I started.
When I look in my browser window at my Rancher setup. I choose the correlating cluster and then on the left hand side select Monitoring Overview.

I see 5 dashboard panels. All of these panels show as unavailable.
I am not sure who I can ask to point me in the right direction to resolve this.
I am very sorry if this is not the correct place and I hope that you can direct me.
My original issue is resolved.
Thanks for the follow up