kubeasz/playbooks/92.stop.yml

41 lines
931 B
YAML
Raw Normal View History

- hosts: kube_master
2019-10-01 22:32:51 +08:00
tasks:
- 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
- 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:
- kube_master
- kube_node
2019-10-01 22:32:51 +08:00
tasks:
- name: stopping kube_node services
2019-10-01 22:32:51 +08:00
service: name={{ item }} state=stopped enabled=no
with_items:
- 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'"