-
Hi, I am installing RKE2 on a single node with Rancher using a private registry and I was experiencing some issues during the process that I would like to share to get some support. ScenarioDescriptionInstall RKE2 on Ubuntu via Rancher using a private registry (Harbor) Components:
Rancher configuration: (relevant for the issues detailed)
Based on #768, my understanding is that we should not use any rewriting/prefixing with the Issues1. Image pulling issueFirst I created the cluster in Rancher UI, executed the bootstrap command provided there on the server, and it was failing to install initially the To solve this issue, following rancher/rancher#37441 I created this mirror rewrite:
QuestionmarkIn rke2.io documentation it is explained that in order to connect to private registries and use them to pull private images on each node, it is needed to create the file
I assumed that it was because in the cluster yaml created in Rancher, these values were empty (I didn't add these repositories values there), and maybe they were overwriting the file I manually saved in the file system. I set these registries/mirrors/rewrite values editing the yaml of the cluster creation in Rancher, and it solved the issue. The file
But.. is that the expected behavior? At least from the rke.io documentation referenced above is confusing.
2. rke2-server not installingOnce the previous issue was resolved, the
Then the second issue kicked on, and checking the
To solve the issue, I edited manually the file
And in the next iteration of the service restart, Questionmarkit seems like Once the RKE2 cluster was installed, up and running, out of curiosity I change on Rancher's Global Settings the
And then the RKE2 cluster stopped working. I logged into the server, and realized that
I edited again the file manually in order to remove /docker.io, and So my guess is that when a global setting is changed in Rancher it is pushed to the RKE2 clusters into this file If rke2 services on the cluster actively connect to Rancher and pull the actual global settings into Would appreciate if anyone can clarify to me this doubts. Kind regards! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
If this was an Issue I would transfer it to rancher/rancher, since it sounds like most of your questions are around managing the configuration of Rancher-provisioned clusters, not about RKE2 itself. I will say that if you are using Rancher to provision your clusters, you should do all of your cluster configuration in Rancher. If you change the content of configuration files managed by the agent, it will be restored by the agent. If you edit the registry configuration, it will be restored by the agent. You should make your changes to the default registry and registry mirror/rewrites on the Rancher side, rather than trying to correct it by hand on the nodes afterwards. |
Beta Was this translation helpful? Give feedback.
If this was an Issue I would transfer it to rancher/rancher, since it sounds like most of your questions are around managing the configuration of Rancher-provisioned clusters, not about RKE2 itself.
I will say that if you are using Rancher to provision your clusters, you should do all of your cluster configuration in Rancher. If you change the content of configuration files managed by the agent, it will be restored by the agent. If you edit the registry configuration, it will be restored by the agent.
You should make your changes to the default registry and registry mirror/rewrites on the Rancher side, rather than trying to correct it by hand on the nodes afterwards.