2021-01-19 17:41:00 +08:00
|
|
|
- hosts: kube_master
|
2019-10-01 22:32:51 +08:00
|
|
|
tasks:
|
2021-01-19 17:41:00 +08:00
|
|
|
- name: stopping kube_master services
|
2019-10-01 22:32:51 +08:00
|
|
|
service: name={{ item }} state=stopped enabled=no
|
|
|
|
with_items:
|
|
|
|
- kube-apiserver
|
|
|
|
- kube-controller-manager
|
|
|
|
- kube-scheduler
|
|
|
|
|
|
|
|
- hosts: etcd
|
|
|
|
tasks:
|
|
|
|
- name: stopping etcd cluster
|
|
|
|
service: name=etcd state=stopped enabled=no
|
|
|
|
|
2021-01-19 17:41:00 +08:00
|
|
|
- hosts: ex_lb
|
2019-10-01 22:32:51 +08:00
|
|
|
tasks:
|
|
|
|
- name: stopping external loadbalance
|
|
|
|
service: name={{ item }} state=stopped enabled=no
|
|
|
|
with_items:
|
2023-01-17 14:11:27 +08:00
|
|
|
- l4lb
|
2019-10-01 22:32:51 +08:00
|
|
|
- keepalived
|
|
|
|
|
|
|
|
- hosts:
|
2021-01-19 17:41:00 +08:00
|
|
|
- kube_master
|
|
|
|
- kube_node
|
2019-10-01 22:32:51 +08:00
|
|
|
tasks:
|
2021-01-19 17:41:00 +08:00
|
|
|
- name: stopping kube_node services
|
2019-10-01 22:32:51 +08:00
|
|
|
service: name={{ item }} state=stopped enabled=no
|
|
|
|
with_items:
|
2021-04-01 19:18:59 +08:00
|
|
|
- kube-lb
|
2019-10-01 22:32:51 +08:00
|
|
|
- kubelet
|
|
|
|
- kube-proxy
|
|
|
|
|
|
|
|
- name: stopping docker
|
|
|
|
service: name=docker state=stopped enabled=no
|
|
|
|
when: "CONTAINER_RUNTIME == 'docker'"
|
|
|
|
|
|
|
|
- name: stopping containerd
|
|
|
|
service: name=containerd state=stopped enabled=no
|
|
|
|
when: "CONTAINER_RUNTIME == 'containerd'"
|