Skip to content

Commit

Permalink
Add retry to kubectl command
Browse files Browse the repository at this point in the history
  • Loading branch information
rafzei committed Feb 17, 2022
1 parent 6ea36a8 commit 1f022c7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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: >-
Expand Down

0 comments on commit 1f022c7

Please sign in to comment.