diff --git a/ansible/playbooks/roles/upgrade/tasks/kubernetes/upgrade-master0.yml b/ansible/playbooks/roles/upgrade/tasks/kubernetes/upgrade-master0.yml index 2c32b4768b..480ccf7c46 100644 --- a/ansible/playbooks/roles/upgrade/tasks/kubernetes/upgrade-master0.yml +++ b/ansible/playbooks/roles/upgrade/tasks/kubernetes/upgrade-master0.yml @@ -44,6 +44,11 @@ - name: k8s/master0 | Add k8s annotation for containerd command: >- kubectl annotate node {{ inventory_hostname }} --overwrite kubeadm.alpha.kubernetes.io/cri-socket=unix:///run/containerd/containerd.sock + register: result + until: + - result is succeeded + retries: 5 + delay: 1 # Note: Usage of the --config flag for reconfiguring the cluster during upgrade is not recommended since v1.16 - name: k8s/master0 | Upgrade K8s cluster to v{{ version }} diff --git a/ansible/playbooks/roles/upgrade/tasks/kubernetes/upgrade-masterN.yml b/ansible/playbooks/roles/upgrade/tasks/kubernetes/upgrade-masterN.yml index c615ecc858..eea8bb0693 100644 --- a/ansible/playbooks/roles/upgrade/tasks/kubernetes/upgrade-masterN.yml +++ b/ansible/playbooks/roles/upgrade/tasks/kubernetes/upgrade-masterN.yml @@ -10,6 +10,11 @@ - name: k8s/masterN | Add k8s annotation for containerd command: >- kubectl annotate node {{ inventory_hostname }} --overwrite kubeadm.alpha.kubernetes.io/cri-socket=unix:///run/containerd/containerd.sock + register: result + until: + - result is succeeded + retries: 5 + delay: 1 - name: k8s/masterN | Upgrade master {{ inventory_hostname }} command: >-