Worker nodes created with the root password access #535
-
|
I'm new to using this tool, but the first impression is great! The cluster I created has one master and two worker nodes. Master VM can be SSH into using the key and port provided in cluster_config.yaml file when creating a cluster. However, once worker nodes are created, Hetzner sends an email with the root password. Isn't it insecure, and why would't the same SSH key used for master be injected into the worker nodes during cluster creation? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
Hi, glad you like it :) Did you perhaps already have the same key added to your Hetzner project? Usually, hetzner-k3s uploads the SSH key you specify in the config file to your Hetzner project and names it after the cluster. However, if a key with the same fingerprint already exists in your Hetzner project, hetzner-k3s can't upload the key because two keys with identical fingerprints but different names cannot coexist in the same project. So when new nodes are created, they reference a key by the cluster name that doesn't exist in this scenario. As a result, Hetzner sends you emails with the root passwords. This doesn't occur when there are no keys in your Hetzner project that match the fingerprint of the key specified in the config file. In such cases, Hetzner can inject the key directly into the nodes, eliminating the need for a root password and an email. To sum up, if you had already added the same key to your project, that's why you're receiving those emails. You can rename the existing key using the same name as your cluster, so new nodes created by hetzner-k3s will have the key correctly injected. The only weird thing you mentioned is not getting an email for the master. I'm wondering if this could be a delivery issue with that specific email or something similar, because the key configuration is the same across all nodes in your cluster. By the way, can you also SSH manually into the worker nodes? To confirm whether my explanation fits your situation: if there's indeed a key in your Hetzner project with the same fingerprint as specified in the config file, you can rename that key to match your cluster's name or simply delete it. This way, Hetzner-k3s will recreate the key with the expected name for you. Next, try increasing your node pool by one and then run the |
Beta Was this translation helpful? Give feedback.
-
|
Is this somewhere stated in the docs? This issue has driven me crazy over the last few days and since I am not the owner of the cluster I did not receive any mails. Glad, i finally found this thread! But I would recommend to add this to the troubleshooting section. |
Beta Was this translation helpful? Give feedback.
Sure, the simplest solution for now is to use a different key. I'll add it to my list of tasks to make it possible to specify an existing key, just like we do for the private network. For now, using a different key should work fine.