I installed and managed to run successfully (i can log to the admin panel, everything is green) rancher server on machine 1. Machine 1 is running rancher server with no extra application at all. In my plan, It is dedicated to be the master in a kubernetes cluster.
Then, I rsync machine 1(with rancher already set on machine1) to a new machine, machine 2. I followed again the quick start guide, started the server and added machine 2 as a host (maybe is it an error?).
Now, back on machine 1 rancher admin panel, I added machine 2 with add a host. On the infrastructure > hosts menu, I can see the two machines.
But now I have some pods that are no more working. Machine 2 Namespace is full of red with the same message everywhere: failed to find label for POD . Stack kubernete is full of red too for machine 2, and a few of services for machine 1.
Is this an expected behaviour, as maybe some services don’t have to run twice (one on each machine)? Did I broke something when using machine 2 as a clone of machine 1 which had rancher already set? How can I deal with my situation? Hopefully no applications has yet been deployed, so I don’t put at risk anything.
Thank you for hints as I am very new to kubernetes.
EDIT:
It seems this rancher doc provides an answer to my issue. Adding Hosts to the same machine as Rancher Server (it seems it is my case if I understand well) : If you are adding an agent host on the same machine as Rancher server, you must edit the command provided from the UI. In the UI, you can specify the IP that you want the Rancher agent container to use to comminicate to your Rancher server. It will automatically add in an environment variable to the command.
Any comment/hint?
EDIT 2: after a deep reading of rancher official doc, I finally understood how to deploy correctly Kubernetes. This post is now useless