Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot Upgrade k3s version #327

Open
gwadson opened this issue Mar 1, 2024 · 5 comments
Open

Cannot Upgrade k3s version #327

gwadson opened this issue Mar 1, 2024 · 5 comments

Comments

@gwadson
Copy link

gwadson commented Mar 1, 2024

Hi,
Thanks for the project and your efforts really amazing.

I having issue to upgrade.
no matter the version I'm getting the following error:

=== k3s version upgrade ===
error: resource mapping not found for name: "k3s-server" namespace: "system-upgrade" from "STDIN": no matches for kind "Plan" in version "upgrade.cattle.io/v1"
ensure CRDs are installed first
Failed to create upgrade plan for controlplane:
error: resource mapping not found for name: "k3s-server" namespace: "system-upgrade" from "STDIN": no matches for kind "Plan" in version "upgrade.cattle.io/v1"
ensure CRDs are installed first

After Installation this are the CRD availble

kubectl get crds
NAME                              CREATED AT
addons.k3s.cattle.io              2024-03-01T14:31:14Z
etcdsnapshotfiles.k3s.cattle.io   2024-03-01T14:31:14Z
helmchartconfigs.helm.cattle.io   2024-03-01T14:31:14Z
helmcharts.helm.cattle.io         2024-03-01T14:31:14Z

Any Idea what could be the reason?
Thank you

I using WSL. and here is my cluster definition file.
cluster_name: sis-rnd-cluster
kubeconfig_path: "./kubeconfig"
k3s_version: v1.29.1+k3s2
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
disable_flannel: false # set to true if you want to install a different CNI
schedule_workloads_on_masters: false
# cluster_cidr: 10.244.0.0/16 # optional: a custom IPv4/IPv6 network CIDR to use for pod IPs
# service_cidr: 10.43.0.0/16 # optional: a custom IPv4/IPv6 network CIDR to use for service IPs
# cluster_dns: 10.43.0.10 # optional: IPv4 Cluster IP for coredns service. Needs to be an address from the service_cidr range
# enable_public_net_ipv4: false # default is true
# enable_public_net_ipv6: false # default is true
# image: rocky-9 # optional: default is ubuntu-22.04
# autoscaling_image: 103908130 # optional, defaults to the `image` setting
# snapshot_os: microos # optional: specified the os type when using a custom snapshot
cloud_controller_manager_manifest_url: "https://github.com/hetznercloud/hcloud-cloud-controller-manager/releases/download/v1.18.0/ccm-networks.yaml"
csi_driver_manifest_url: "https://raw.githubusercontent.com/hetznercloud/csi-driver/v2.5.1/deploy/kubernetes/hcloud-csi.yml"
system_upgrade_controller_manifest_url: "https://raw.githubusercontent.com/rancher/system-upgrade-controller/master/manifests/system-upgrade-controller.yaml"
masters_pool:
  instance_type: cpx11
  instance_count: 3
  location: nbg1
worker_node_pools:
- name: small-static
  instance_type: cpx11
  instance_count: 2
  location: nbg1
@michaelfresco
Copy link

@gwadson:

If you have chance, could you you please run the following command:

$ k get pods -n system-upgrade

A normal output would be 1/1 READY

@michaelfresco
Copy link

michaelfresco commented Mar 20, 2024

What's happening, I think, is that the path of the update controller we are currently using, links to an image which is no longer available. But we could use the update controller from the official k3s docs. Note that the URL is different.

---
hetzner_token: <your token>
cluster_name: test
kubeconfig_path: "./kubeconfig"
k3s_version: v1.26.4+k3s1
public_ssh_key_path: "~/.ssh/id_rsa.pub"
private_ssh_key_path: "~/.ssh/id_rsa"
use_ssh_agent: false # ...
ssh_allowed_networks:
  - 0.0.0.0/0
api_allowed_networks:
  - 0.0.0.0/0
private_network_subnet: 10.0.0.0/16
disable_flannel: false
schedule_workloads_on_masters: false
system_upgrade_controller_manifest_url: "https://raw.githubusercontent.com/rancher/system-upgrade-controller/v0.13.4/manifests/system-upgrade-controller.yaml"
masters_pool:
  instance_type: cpx21
  instance_count: 3
  location: nbg1

@vitobotta
Copy link
Owner

Thanks @michaelfresco - I will see if I can update the tool this coming week to handle this properly.

@vitobotta
Copy link
Owner

I have fixed the setup of the System Upgrade Controller in main and this fix will come with the next release. I have tested fine but if any of you has a chance to double check that it's working as expected that would be nice.

@vitobotta
Copy link
Owner

Related #332

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants