|
@ -16,19 +16,22 @@ |
|
|
- name: Master | Restart apiserver |
|
|
- name: Master | Restart apiserver |
|
|
command: /bin/true |
|
|
command: /bin/true |
|
|
notify: |
|
|
notify: |
|
|
- Master | Remove apiserver container |
|
|
|
|
|
|
|
|
- Master | Remove apiserver container docker |
|
|
|
|
|
- Master | Remove apiserver container containerd/crio |
|
|
- Master | wait for the apiserver to be running |
|
|
- Master | wait for the apiserver to be running |
|
|
|
|
|
|
|
|
- name: Master | Restart kube-scheduler |
|
|
- name: Master | Restart kube-scheduler |
|
|
command: /bin/true |
|
|
command: /bin/true |
|
|
notify: |
|
|
notify: |
|
|
- Master | Remove scheduler container |
|
|
|
|
|
|
|
|
- Master | Remove scheduler container docker |
|
|
|
|
|
- Master | Remove scheduler container containerd/crio |
|
|
- Master | wait for kube-scheduler |
|
|
- Master | wait for kube-scheduler |
|
|
|
|
|
|
|
|
- name: Master | Restart kube-controller-manager |
|
|
- name: Master | Restart kube-controller-manager |
|
|
command: /bin/true |
|
|
command: /bin/true |
|
|
notify: |
|
|
notify: |
|
|
- Master | Remove controller manager container |
|
|
|
|
|
|
|
|
- Master | Remove controller manager container docker |
|
|
|
|
|
- Master | Remove controller manager container containerd/crio |
|
|
- Master | wait for kube-controller-manager |
|
|
- Master | wait for kube-controller-manager |
|
|
|
|
|
|
|
|
- name: Master | reload systemd |
|
|
- name: Master | reload systemd |
|
@ -40,26 +43,53 @@ |
|
|
name: kubelet |
|
|
name: kubelet |
|
|
state: restarted |
|
|
state: restarted |
|
|
|
|
|
|
|
|
- name: Master | Remove apiserver container |
|
|
|
|
|
shell: "docker ps -af name=k8s_kube-apiserver* -q | xargs --no-run-if-empty docker rm -f" |
|
|
|
|
|
|
|
|
- name: Master | Remove apiserver container docker |
|
|
|
|
|
shell: docker ps -af name=k8s_kube-apiserver* -q | xargs --no-run-if-empty docker rm -f |
|
|
register: remove_apiserver_container |
|
|
register: remove_apiserver_container |
|
|
retries: 10 |
|
|
retries: 10 |
|
|
until: remove_apiserver_container.rc == 0 |
|
|
until: remove_apiserver_container.rc == 0 |
|
|
delay: 1 |
|
|
delay: 1 |
|
|
|
|
|
when: container_manager == "docker" |
|
|
|
|
|
|
|
|
- name: Master | Remove scheduler container |
|
|
|
|
|
|
|
|
- name: Master | Remove apiserver container containerd/crio |
|
|
|
|
|
shell: crictl pods --name kube-apiserver* -q | xargs -I% --no-run-if-empty bash -c 'crictl stopp % && crictl rmp %' |
|
|
|
|
|
register: remove_apiserver_container |
|
|
|
|
|
retries: 10 |
|
|
|
|
|
until: remove_apiserver_container.rc == 0 |
|
|
|
|
|
delay: 1 |
|
|
|
|
|
when: container_manager in ['containerd', 'crio'] |
|
|
|
|
|
|
|
|
|
|
|
- name: Master | Remove scheduler container docker |
|
|
shell: "docker ps -af name=k8s_kube-scheduler* -q | xargs --no-run-if-empty docker rm -f" |
|
|
shell: "docker ps -af name=k8s_kube-scheduler* -q | xargs --no-run-if-empty docker rm -f" |
|
|
register: remove_scheduler_container |
|
|
register: remove_scheduler_container |
|
|
retries: 10 |
|
|
retries: 10 |
|
|
until: remove_scheduler_container.rc == 0 |
|
|
until: remove_scheduler_container.rc == 0 |
|
|
delay: 1 |
|
|
delay: 1 |
|
|
|
|
|
when: container_manager == "docker" |
|
|
|
|
|
|
|
|
- name: Master | Remove controller manager container |
|
|
|
|
|
|
|
|
- name: Master | Remove scheduler container containerd/crio |
|
|
|
|
|
shell: crictl pods --name kube-scheduler* -q | xargs -I% --no-run-if-empty bash -c 'crictl stopp % && crictl rmp %' |
|
|
|
|
|
register: remove_scheduler_container |
|
|
|
|
|
retries: 10 |
|
|
|
|
|
until: remove_scheduler_container.rc == 0 |
|
|
|
|
|
delay: 1 |
|
|
|
|
|
when: container_manager in ['containerd', 'crio'] |
|
|
|
|
|
|
|
|
|
|
|
- name: Master | Remove controller manager container docker |
|
|
shell: "docker ps -af name=k8s_kube-controller-manager* -q | xargs --no-run-if-empty docker rm -f" |
|
|
shell: "docker ps -af name=k8s_kube-controller-manager* -q | xargs --no-run-if-empty docker rm -f" |
|
|
register: remove_cm_container |
|
|
register: remove_cm_container |
|
|
retries: 10 |
|
|
retries: 10 |
|
|
until: remove_cm_container.rc == 0 |
|
|
until: remove_cm_container.rc == 0 |
|
|
delay: 1 |
|
|
delay: 1 |
|
|
|
|
|
when: container_manager == "docker" |
|
|
|
|
|
|
|
|
|
|
|
- name: Master | Remove controller manager container containerd/crio |
|
|
|
|
|
shell: crictl pods --name kube-controller-manager* -q | xargs -I% --no-run-if-empty bash -c 'crictl stopp % && crictl rmp %' |
|
|
|
|
|
register: remove_cm_container |
|
|
|
|
|
retries: 10 |
|
|
|
|
|
until: remove_cm_container.rc == 0 |
|
|
|
|
|
delay: 1 |
|
|
|
|
|
when: container_manager in ['containerd', 'crio'] |
|
|
|
|
|
|
|
|
- name: Master | wait for kube-scheduler |
|
|
- name: Master | wait for kube-scheduler |
|
|
uri: |
|
|
uri: |
|
|