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

Support automatic k8s upgrade with system-upgrade-controller #17

Merged
merged 3 commits into from
Jul 27, 2024

Conversation

go-zen-chu
Copy link
Owner

@go-zen-chu go-zen-chu commented Jul 27, 2024

Why

What

  • Since we use k3s, we install system-upgrade-controller to upgrade k8s version to stable

QA, Evidence

  • Checked applying manifest
$ ansible-playbook -i hosts.yml --limit control_plane1 playbook.yml -t system-upgrade-controller                                                               (git)-[support-automatic-k8s-upgrade] 
SSH password: 
BECOME password[defaults to SSH password]: 

PLAY [inits] ***************************************************************************************************************************************************************************************************************************************************************************
skipping: no hosts matched

PLAY [k8s_control_planes] **************************************************************************************************************************************************************************************************************************************************************

PLAY [k8s_workers] *********************************************************************************************************************************************************************************************************************************************************************
skipping: no hosts matched

PLAY [k8s_control_planes] **************************************************************************************************************************************************************************************************************************************************************

PLAY [k8s_control_planes] **************************************************************************************************************************************************************************************************************************************************************

TASK [Gathering Facts] *****************************************************************************************************************************************************************************************************************************************************************
ok: [machine_control_plane1]

TASK [system-upgrade-controller : Ensure /home/ansible/k8s exists] *********************************************************************************************************************************************************************************************************************
ok: [machine_control_plane1]

TASK [system-upgrade-controller : Copy manifests] **************************************************************************************************************************************************************************************************************************************
changed: [machine_control_plane1]

TASK [system-upgrade-controller : Apply system-upgrade-controller manifest] ************************************************************************************************************************************************************************************************************
changed: [machine_control_plane1]

TASK [system-upgrade-controller : Copy k8s upgrade plan] *******************************************************************************************************************************************************************************************************************************
ok: [machine_control_plane1]

TASK [system-upgrade-controller : shell] ***********************************************************************************************************************************************************************************************************************************************
changed: [machine_control_plane1]

PLAY RECAP *****************************************************************************************************************************************************************************************************************************************************************************
machine_control_plane1     : ok=6    changed=3    unreachable=0    failed=0    skipped=0    rescued=0    ignored=0   
  • check k8s nodes are upgraded
$ kgno
NAME    STATUS     ROLES                  AGE    VERSION
node1   Ready      control-plane,master   334d   v1.29.6+k3s2
node2   Ready      <none>                 334d   v1.29.6+k3s2
node3   NotReady   <none>                 334d   v1.27.4+k3s1

@go-zen-chu go-zen-chu marked this pull request as ready for review July 27, 2024 09:37
@go-zen-chu go-zen-chu merged commit 298131b into main Jul 27, 2024
@go-zen-chu go-zen-chu deleted the support-automatic-k8s-upgrade branch July 27, 2024 09:38
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

Successfully merging this pull request may close these issues.

Support kubernetes version upgrade
1 participant