Closed boris-savic closed 1 month ago
Hi! Can you share the 1.x version of the config file?
cluster_name: test-cluster
kubeconfig_path: "kubeconfig"
k3s_version: v1.29.0+k3s1
public_ssh_key_path: "~/.ssh/id_rsa.pub"
private_ssh_key_path: "~/.ssh/id_rsa"
use_ssh_agent: false # set to true if your key has a passphrase or if SSH connections don't work or seem to hang without agent. See https://github.com/vitobotta/hetzner-k3s#limitations
# ssh_port: 22
ssh_allowed_networks:
- 0.0.0.0/0 # ensure your current IP is included in the range
api_allowed_networks:
- 0.0.0.0/0 # ensure your current IP is included in the range
private_network_subnet: 10.0.0.0/16 # ensure this doesn't overlap with other networks in the same project
schedule_workloads_on_masters: true
cloud_controller_manager_manifest_url: "https://github.com/hetznercloud/hcloud-cloud-controller-manager/releases/download/v1.20.0/ccm-networks.yaml"
csi_driver_manifest_url: "https://raw.githubusercontent.com/hetznercloud/csi-driver/v2.8.0/deploy/kubernetes/hcloud-csi.yml"
system_upgrade_controller_manifest_url: "https://github.com/rancher/system-upgrade-controller/releases/download/v0.13.4/system-upgrade-controller.yaml"
masters_pool:
instance_type: cpx21
instance_count: 1
location: fsn1
worker_node_pools:
- name: database-small-static
instance_type: cpx21
instance_count: 1
location: fsn1
How long ago have you created this cluster and when was last time you ran the create command before the upgrade to 2.x? Also are you using the very latest version, not 2.0.0?
Made the cluster couple of months ago - havent ran commands on it since.
Using 2.0.8 installed it today and checked with --version.
Can you SSH into the master and check the status of the k3s service? Also check the logs with journalctl.
Inspecting the logs it seems that there is something wrong with embedded-registry
Oct 09 21:03:24 test-cluster-cpx21-master1 k3s[515672]: time="2024-10-09T21:03:24Z" level=fatal msg="flag provided but not defined: -embedded-registry"
Changing the value for embedded registry mirror to false helped.
embedded_registry_mirror:
enabled: false
Had some more errors, regarding System Upgrade Controller but that was resolved after rerunning the cluster create command.
Another issue I seem to have, but is minor, is that I have also some labels / taints set on the worker node (didn't include that in the config file as it was not really relevant), but something seems to be broken with that on migration. Full worker spec below:
worker_node_pools:
- name: database-small-static
instance_type: cpx21
instance_count: 1
location: fsn1
# image: debian-11
labels:
- key: server/database
value: "true"
taints:
- key: server/database
value: true:NoSchedule
Error now seems to be
[Instance test-cluster-cpx21-pool-database-small-static-worker1] [INFO] No change detected so skipping service start
[Instance test-cluster-cpx21-pool-database-small-static-worker1] ...k3s has been deployed to worker test-cluster-cpx21-pool-database-small-static-worker1.
[Node labels]
Adding labels to database-small-static pool workers...
error: resource(s) were provided, but no name was specified
[Node labels] : error: resource(s) were provided, but no name was specified
Ah yes! I hadn't thought about the embedded registry. Your current k3s version is not supported https://docs.k3s.io/installation/registry-mirror
So you'd have to upgrade k3s (with the hetzner-k3s upgrade
command, see docs) to be able to enable the embedded registry.
As for the labels and taints, it was reported already and I have fixed it. I will try to make a new release this weekend or the next depending on the time available. In the meantime since it's just a few nodes, you can label them manually as a workaround.
Thank you for all the help.
Perhaps you can add to the 2.0.0 release notes in the upgrade section this new information :)
Closing the issue now
Thank you. I had the same issue,
Could you, please, add this information embedded_registry_mirror.enabled = false
to the migration guide. That would be helpful for those who has an older version of kubernetes which doesn't support registry-mirror
I updated both the release notes and the docs about it. Thanks for the reminder :)
Hi,
first thanks for the amazing work. I have setup a small test cluster with 1.1.5 version , that I tried to upgrade with 2.0.8 hetzner-k3s release.
I have followed the steps in the 2.0.0. release notes where i did:
/etc/k8s-resolv.conf
to containnameserver 8.8.8.8
include_instance_type_in_instance_name: true
to config fileCurrent behavior:
So right now I'm stuck with a broken state and I cant figure out what I did wrong :/
When I run the
hetzner-k3s create
command the process times out and the full log output is:My config file is: