fix: restore an etcd cluster #973

pull/992/head
gjmzj 2021-02-01 13:31:11 +08:00
parent afccce3f42
commit 56813cb01b
1 changed files with 39 additions and 0 deletions

View File

@ -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