|
|
|
@ -32,7 +32,7 @@ |
|
|
|
|
name: "{{ item }}" |
|
|
|
|
selection: install |
|
|
|
|
with_items: |
|
|
|
|
- "kubelet" |
|
|
|
|
# - "kubelet" |
|
|
|
|
- "kubeadm" |
|
|
|
|
- name: Upgrading packages |
|
|
|
|
apt: |
|
|
|
@ -41,7 +41,28 @@ |
|
|
|
|
shell: "kubeadm upgrade plan >> /etc/kubernetes/upgrade_plan_{{ K8S_SOURCE_VERSION}}_{{ K8S_TARGET_VERSION}}" |
|
|
|
|
args: |
|
|
|
|
creates: /etc/kubernetes/upgrade_plan_{{ K8S_SOURCE_VERSION}}_{{ K8S_TARGET_VERSION}} |
|
|
|
|
- name: Pulling new container images |
|
|
|
|
shell: "kubeadm config images pull" |
|
|
|
|
- name: Apply upgrade plan |
|
|
|
|
shell: "sudo kubeadm upgrade apply -y v1.27.13 >> /etc/kubernetes/upgrade_ops_{{ K8S_SOURCE_VERSION}}_{{ K8S_TARGET_VERSION}}" |
|
|
|
|
args: |
|
|
|
|
creates: /etc/kubernetes/upgrade_ops_{{ K8S_SOURCE_VERSION}}_{{ K8S_TARGET_VERSION}} |
|
|
|
|
- name: Unhold kubelet |
|
|
|
|
dpkg_selections: |
|
|
|
|
name: kubelet |
|
|
|
|
selection: install |
|
|
|
|
- name: Update kubelet |
|
|
|
|
apt: |
|
|
|
|
update_cache: yes |
|
|
|
|
upgrade: yes |
|
|
|
|
- name: Restart kubelet |
|
|
|
|
service: |
|
|
|
|
name: kubelet |
|
|
|
|
state: restarted |
|
|
|
|
- name: Pin new package versions |
|
|
|
|
dpkg_selections: |
|
|
|
|
name: "{{ item }}" |
|
|
|
|
selection: hold |
|
|
|
|
with_items: |
|
|
|
|
- "kubelet" |
|
|
|
|
- "kubeadm" |
|
|
|
|