mirror of https://github.com/easzlab/kubeasz.git
fix: restore an etcd cluster #973
parent
afccce3f42
commit
56813cb01b
|
@ -1,6 +1,45 @@
|
||||||
# cluster-restore playbook
|
# cluster-restore playbook
|
||||||
# read the guide: 'op/cluster_restore.md'
|
# read the guide: 'op/cluster_restore.md'
|
||||||
|
# https://kubernetes.io/docs/tasks/administer-cluster/configure-upgrade-etcd/#restoring-an-etcd-cluster
|
||||||
|
|
||||||
|
- hosts: kube_master
|
||||||
|
tasks:
|
||||||
|
- name: stopping kube_master services
|
||||||
|
service: name={{ item }} state=stopped
|
||||||
|
with_items:
|
||||||
|
- kube-apiserver
|
||||||
|
- kube-controller-manager
|
||||||
|
- kube-scheduler
|
||||||
|
|
||||||
|
- hosts:
|
||||||
|
- kube_master
|
||||||
|
- kube_node
|
||||||
|
tasks:
|
||||||
|
- name: stopping kube_node services
|
||||||
|
service: name={{ item }} state=stopped
|
||||||
|
with_items:
|
||||||
|
- kubelet
|
||||||
|
- kube-proxy
|
||||||
|
|
||||||
- hosts: etcd
|
- hosts: etcd
|
||||||
roles:
|
roles:
|
||||||
- cluster-restore
|
- cluster-restore
|
||||||
|
|
||||||
|
- hosts: kube_master
|
||||||
|
tasks:
|
||||||
|
- name: starting kube_master services
|
||||||
|
service: name={{ item }} state=started enabled=yes
|
||||||
|
with_items:
|
||||||
|
- kube-apiserver
|
||||||
|
- kube-controller-manager
|
||||||
|
- kube-scheduler
|
||||||
|
|
||||||
|
- hosts:
|
||||||
|
- kube_master
|
||||||
|
- kube_node
|
||||||
|
tasks:
|
||||||
|
- name: starting kube_node services
|
||||||
|
service: name={{ item }} state=started enabled=yes
|
||||||
|
with_items:
|
||||||
|
- kubelet
|
||||||
|
- kube-proxy
|
||||||
|
|
Loading…
Reference in New Issue